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.
- Prepare
- SQL
- Aggregation
- Average Population
- Discussions
Average Population
Average Population
Sort by
recency
|
722 Discussions
|
Please Login in order to post a comment
The answer accepted by test engine is: SELECT FLOOR(AVG(POPULATION)) FROM CITY. However, for this to be the answer the question shoud be "find the average population ACROSS all cities", NOT "FOR all cities". For implies at the city granularity, which would require a grouping at the city level.
SELECT FLOOR(AVG(POPULATION)) FROM CITY;
SELECT ROUND(AVG(population), 1) FROM CITY;
SELECT ROUND(SUM(Population)/Count(*)) FROM City