Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2740

How to select a max value within a group

$
0
0

I'm creating a crystal report that uses two fields (Lease#, ID#), and I want to group records by Lease#, and then only display those records with the maximum ID#.

 

Lease    ID#

 

LeaseA   1

LeaseA   2

 

LeaseB  1

LeaseB  2

LeaseB  3

 

Using this example, I want these records to be returned:

 

LeaseA   2

LeaseB   3

 

I'm sure this is simple but I'm stumped.


Viewing all articles
Browse latest Browse all 2740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>