| Pk | ID | D |
| 1 | 2 | 20 |
2 | 3 | 46 |
| 3 | 2 | 23 |
| 4 | 3 | 56 |
| 5 | 4 | 55 |
| 6 | 4 | 12 |
find max D value of distinct ID
| Pk | ID | D |
| 1 | 2 | 20 |
2 | 3 | 46 |
| 3 | 2 | 23 |
| 4 | 3 | 56 |
| 5 | 4 | 55 |
| 6 | 4 | 12 |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Upendra Pratap ShahiPosted Aug 17, 2015, 2:26 AM
select MAX(D) as D, ID from TestTable group by ID
Manas MohapatraPosted Aug 17, 2015, 1:14 AM
Sumit JoshiPosted Aug 17, 2015, 1:08 AM