Hi guys,
I have table with data like:
Name Rank Year
AAA 123 1900
BBB 127 1910
CCC 25 1910
AAA 542 1930
....
I want to display the top 3 distinct names with their total ranks like (AAA = 674) ordered by their total rank. Something like:
Name Rank
AAA 674
BBB 127
CCC 25
I tried using the distinct clause with order by and it errored out.
I would appreciate any help over this!
Thanks!
I have table with data like:
Name Rank Year
AAA 123 1900
BBB 127 1910
CCC 25 1910
AAA 542 1930
....
I want to display the top 3 distinct names with their total ranks like (AAA = 674) ordered by their total rank. Something like:
Name Rank
AAA 674
BBB 127
CCC 25
I tried using the distinct clause with order by and it errored out.
I would appreciate any help over this!
Thanks!