We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Average Population of Each Continent
Average Population of Each Continent
Sort by
recency
|
1725 Discussions
|
Please Login in order to post a comment
SELECT COUNTRY.Continent, FLOOR(AVG(CITY.Population)) FROM CITY JOIN COUNTRY ON CITY.CountryCode = COUNTRY.Code GROUP BY COUNTRY.Continent
SELECT CN.Continent,floor(AVG(C.Population)) AS AVG_POPULATION FROM CITY C JOIN COUNTRY CN ON C.CountryCode = CN.Code group by Continent;
What is the necessity of using group by?
SELECT CO.Continent, TRUNCATE(AVG(CI.POPULATION),0) FROM CITY AS CI INNER JOIN COUNTRY AS CO ON CI.CountryCode = CO.Code GROUP BY CO.Continent;