Dear friends,
My table is as show in below… for each ‘grpid’ I want get row with Max tiv value and code should be distinct. Ie in result, code & grpid will come only once.
grpid | code | Tiv |
2 | GB | 9 |
2 | IN | 7 |
1 | GB | 11 |
1 | US | 10 |
Result: ( we are selecting IN even though for grpid 2 ‘GB’ has max value)
grpid | code | Tiv |
2 | IN | 7 |
1 | GB | 11 |
-Sajid