1
我试图回答以下问题作为Mondial DB的一部分。Mondial DB内部查询
-- For each country display the city with the highest population together with the number of the population.
的表是:
国家(代码,名称,资本,省,面积,人口)
市(名称,国家,省,经度,纬度,人口)
到目前为止,我有以下内容:
SELECT
Country.Name, MaxCity.CityName, MaxCity.Population
FROM
(SELECT
MAX(Population) AS Population,
City.Country,
City.Name AS CityName
FROM
City
GROUP BY City.Country) AS MaxCity
JOIN
Country ON Country.Code = MaxCity.Country;
这是哪里出错了?
组需要添加您可以编辑您以前的答案。 – 2013-05-06 07:37:48