티스토리 뷰
https://www.hackerrank.com/challenges/weather-observation-station-5
Weather Observation Station 5 | HackerRank
Write a query to print the shortest and longest length city name along with the length of the city names.
www.hackerrank.com
with base as (
select
city, length(city) len
, dense_rank() over (order by length(city), city) rn1
, dense_rank() over (order by length(city) desc, city) rn2
from station
)
select
distinct city, len
from base
where rn1 = 1 or rn2 = 1
'프로그래밍연습 > SQL' 카테고리의 다른 글
[SQL]rising-temperature (0) | 2023.08.24 |
---|---|
[SQL]confirmation-rate (0) | 2023.08.22 |
[SQL]exchange-seats (0) | 2023.08.21 |
[SQL]friend-requests-ii-who-has-the-most-friends (0) | 2023.08.20 |
[SQL]game-play-analysis-iv (0) | 2023.08.19 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- counter
- Python
- 확률
- 분당서울대병원
- leatcode
- 뇌하수체
- 뇌하수체선종
- 프로그래머스
- 힙
- 통계
- SQL
- TensorFlow
- neural network
- 확률분포
- 쿠싱
- 분산
- 상관관계
- 코딩테스트
- 군고구마
- 쿠싱증후군
- 평균
- 상대도수
- 중앙값
- hash
- 조건부확률
- Lambda
- 사분위수
- programmers
- 파이썬
- random forest
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함