순간을 기록으로

[MySQL] Revising Aggregations - Averages 본문

Problem Solving

[MySQL] Revising Aggregations - Averages

luminous13 2022. 4. 5. 19:21

문제

 

풀이

 

첫 번째

select avg(population)
from city
where district = 'california';

두 번째

select sum(population) / count(*)
from city
where district = 'california';

'Problem Solving' 카테고리의 다른 글

[MySQL] Japan Population  (0) 2022.04.05
[MySQL] Average Population  (0) 2022.04.05
[MySQL] Revising Aggregations - The Sum Function  (0) 2022.04.05
[MySQL] Revising Aggregations |  (0) 2022.04.05
[MySQL] The PADS | CONCAT 함수  (0) 2022.03.30
Comments