Algorithm/SQL
[SQL][HackerRank] Revising Aggregations - Averages
융무
2020. 6. 11. 14:34
Revising Aggregations - Averages | HackerRank
Query the average population of all cities in the District of California.
www.hackerrank.com
Query the average population of all cities in CITY where District is California.
Input Format
The CITY table is described as follows:
- query average population ==> SELECT AVG(POPULATION)
- in CITY table ==> FROM CITY
- District is California ==> WHERE DISTRICT = ‘California’
SELECT AVG(POPULATION)
FROM CITY
WHERE DISTRICT = 'California';