Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 스프링부트 도커로 배포
- lv2
- 자바
- 삼각형의 완성조건
- 프로그래머스 풀이
- Queue
- 프로그래머스 문자열 정렬
- StringTokenizer
- 백준
- 스프링부트 도커
- 오름차순 정렬
- index of
- 프로그래머스
- 스택
- 버퍼
- lv0
- 큐
- 프로그래머스 자바
- 스프링부트 도커 배포
- 문자열
- 이진수 변환
- 백준 N과 M 자바
- 클라이언트
- java
- SWEA
- Programmers
- Lv1
- Stack
- 알고리즘
- COS Pro
Archives
- Today
- Total
mun dev
[HackerRank] Average Population of Each Continent 오라클 풀이 본문
문제링크
Average Population of Each Continent | HackerRank
Query the names of all continents and their respective city populations, rounded down to the nearest integer.
www.hackerrank.com
풀이
1. 평균 인구수 구하고, 내림을 위해 floor 함수 사용
2. code를 기준으로 조인
3. continent를 기준으로 그룹화
코드
select b.continent, floor(avg(a.population))
from city a join country b
on a.countrycode = b.code
group by b.continent;
'알고리즘 > HackerRank' 카테고리의 다른 글
[HackerRank] Top Competitors 오라클 풀이 (1) | 2024.01.31 |
---|---|
[HackerRank] The Report 오라클 풀이 (1) | 2024.01.31 |
[HackerRank] African cities 오라클 풀이 (0) | 2024.01.31 |
[HackerRank] Weather Observation Station 20 오라클 풀이 (0) | 2024.01.31 |
[HackerRank] Weather Observation Station 15 오라클 풀이 (1) | 2024.01.30 |