CODING TEST/SQL : HackerRank

[MySQL] Revising Aggregations - Averages

주 녕 2021. 4. 20. 16:23
반응형

▶  SQL  >  Aggregation  > Revising Aggregations - Averages 

 Problem 

Query the average population of all cities in CITY where District is California.

Input Format

The CITY table is described as follows: 

 My Answer 

SELECT AVG(POPULATION)
FROM CITY
WHERE DISTRICT = 'California'

 

 

반응형