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';
'Algorithm > SQL' 카테고리의 다른 글
[SQL][HackerRank] Higher Than 75 Marks (0) | 2020.06.11 |
---|---|
[SQL][HackerRank] Average Population (0) | 2020.06.11 |
[SQL][HackerRank] Revising Aggregations - The Sum Function (0) | 2020.06.11 |
[SQL][HackerRank] Revising Aggregations - The Count Function (0) | 2020.06.11 |
[SQL][HackerRank] The PADS (0) | 2020.06.11 |