Ed
asked on
Find Max unique ID SQL
I have a table where In need to find the last transaction of a unique ID
Eg
SalesID TransID Name
85 197 xxxx
85 199 xxxx
85 285 xxxxxxxxxx
85 167 xxxx
106 298 xxxx
106 402 xxxxxxxxxx
106 588 xxxx
so the above I would want to return the max unique ID(TransID) - in the above case the highest TransID of each unique SalesID
Resuts Id wanted returned from the above.
SalesID TransID Name
85 285 xxxxxxxxxx
106 588 xxxx
Eg
SalesID TransID Name
85 197 xxxx
85 199 xxxx
85 285 xxxxxxxxxx
85 167 xxxx
106 298 xxxx
106 402 xxxxxxxxxx
106 588 xxxx
so the above I would want to return the max unique ID(TransID) - in the above case the highest TransID of each unique SalesID
Resuts Id wanted returned from the above.
SalesID TransID Name
85 285 xxxxxxxxxx
106 588 xxxx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER