1. ๋ฌธ์ ์ค๋ช
2. ์ฝ๋
SELECT O.CONTINENT, FLOOR(AVG(C.POPULATION))
FROM CITY AS C
JOIN COUNTRY AS O ON C.COUNTRYCODE = O.CODE
GROUP BY O.CONTINENT;
- FLOOR(2.687) : ์์ ์ฒซ์งธ์๋ฆฌ์์ ๋ฒ๋ฆผ 2
- ROUND(2.687) : ์์ ์ฒซ์งธ์ง๋ฆฌ์์ ๋ฐ์ฌ๋ฆผ 3
- CEIL(2.687) : ์์ ์ฒซ์งธ์๋ฆฌ์์ ์ฌ๋ฆผ 3
- ROUND(2.387, 2) : ์์ ์ ์งธ์๋ฆฌ์์ ๋ฐ์ฌ๋ฆผ 2.39
- ROUND(5961.6, -2) : ์ญ์์๋ฆฌ์์ ๋ฐ์ฌ๋ฆผ 6000
3. ์ฐธ๊ณ
'Programming > SQL' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[HackerRank] Basic Join :Population Census (MySQL) (0) | 2022.02.08 |
---|---|
[HackerRank] Basic Select : Employee Salaries (MySQL) (0) | 2022.02.08 |
[HackerRank] Basic Select : Employee Names (MySQL) (0) | 2022.02.08 |
[HackerRank] Basic Select : Higher Than 75 Marks (MySQL) (0) | 2022.02.08 |
[HackerRank] Basic Select : Weather Observation Station 1~12 (MySQL) (0) | 2022.02.03 |