Link to home
Start Free TrialLog in
Avatar of Danean
Danean

asked on

select last record in group

Below is the code I am using to select the records from the attached table.

I need the last [chgid] ROW ONLY so the results would like the second sample in the attachment.

select clcharge.CHGID
, company
, ssno
, account
, procdesc
from CLCHARGE
where clcharge.COMPANY = 'rmr' and clcharge.ENTRYDATE = '2012-09-20 00:00:00.000'
group by CHGID, COMPANY, SSNO, ACCOUNT, PROCDESC
record-sample.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Brainfeb
Brainfeb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial