HackerRank-My SQL
Prepare > SQL > Aggregation > Revising Aggregations - Averages
stem_sw
2023. 5. 16. 21:00
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.
코드
SELECT AVG(POPULATION) FROM CITY
WHERE DISTRICT ='California';
두 번재 시도
SELECT AVG(POPULATION) FROM CITY
WHERE DISTRICT = 'cALIFORNIA';