본문 바로가기
CODING TEST/SQL : HackerRank

[MySQL] Revising Aggregations - Averages

by 주 녕 2021. 4. 20.
반응형

▶  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'

 

 

반응형

'CODING TEST > SQL : HackerRank' 카테고리의 다른 글

[MYSQL] The Blunder  (0) 2021.05.18
[MYSQL] Population Density Difference  (0) 2021.05.13
[MYSQL] Japan Population  (0) 2021.05.13
[MySQL] Average Population  (0) 2021.04.21
[MySQL] Revising Aggregations - The Count Function  (0) 2021.04.20
[MySQL] Employee Salaries  (0) 2021.04.15
[MySQL] Employee Names  (0) 2021.04.15
[MySQL] Higher Than 75 Marks  (0) 2021.04.13

댓글