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