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
- 자바
- Stack
- 스프링부트 도커
- 스택
- StringTokenizer
- 이진수 변환
- COS Pro
- 클라이언트
- java
- 스프링부트 도커 배포
- 프로그래머스 문자열 정렬
- 백준
- 문자열
- 오름차순 정렬
- 큐
- 스프링부트 도커로 배포
- 백준 N과 M 자바
- Queue
- 프로그래머스
- lv2
- SWEA
- Programmers
- 버퍼
- 프로그래머스 자바
- 알고리즘
- index of
- 프로그래머스 풀이
- 삼각형의 완성조건
- Lv1
- lv0
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 |