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
|
1723 Discussions
|
Please Login in order to post a comment
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;
Gah daymmn, why should we use floor?
Thought this is already correct
select ctr.continent, floor(avg(c.population)) as average_population from city c join country ctr on ctr.code = c.countrycode group by ctr.continent;