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
|
632 Discussions
|
Please Login in order to post a comment
What about FLOOR() function ? i guess is the best to choose instead of ROUND() because we need to round down to the nearest integer FLOOR() function Always rounds down to the next lowest integer. SELECT FLOOR(AVG(POPULATION)) FROM CITY;
Using MySQL :
SELECT ROUND(AVG(POPULATION), 0) FROM CITY;
SELECT AVG(POPULATION) FROM CITY;
MySQL select round(avg(population)) from city;
select round(avg(population),0) from city