I have a query and it brings me how many people live in which country. Select Country, COUNT(EmployeeID) from Employees group by Country
What kind of query should I use if I want to get the most populated city and the number of people living in it?
The code I tried : Select Country, MAX(COUNT(EmployeeID)) from Employees group by Country
2条答案
按热度按时间sbtkgmzw1#
You can use
TOP
:f4t66c6m2#
Try this. qty - count for country, maxqty - max count for all country.
For test data
Result