I have a table which looks like
phoneNumber | City | totalPoints
12345678 | Singapore | 2000
12345679 | Singapore | 3000
23456789 | New York | 2100
12312312 | New York | 2200
12312343 | Beijing | 4000
And I want to get result like
phoneNumber | City | totalPoints
12345679 | Singapore | 3000
12312312 | New York | 2200
12312343 | Beijing | 4000
Just select the row which has the maximun value of totalPoints in each city. How to write the SQL code? (I am using MS SQL Server)