Open BananMoon opened 4 months ago
1) Revising Aggregations - Averages
MySQL / Oracle
select avg(population)
from city
where district = 'California';
2) Revising Aggregations - The Sum Function
MySQL / Oracle
select sum(population)
from city
where district = 'California';
3) Revising Aggregations - The Count Function
MySQL / Oracle
select count(id)
from city
where population > 100000;
MySQL
select round(avg(population))
from city
floor()
사용해도 무관.
집계 함수
CEIL()
: 올림FLOOR()
: 내림ROUND()
: 반올림 ex) ROUND(3.336901, 4) -> 3.3369관련 HacerRank 문제