티스토리 뷰
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
- Python
- 뇌하수체선종
- 쿠싱증후군
- random forest
- 분산
- 조건부확률
- 통계
- 확률분포
- 뇌하수체
- Lambda
- leatcode
- neural network
- 중앙값
- counter
- 파이썬
- 상관관계
- 확률
- 코딩테스트
- 평균
- 프로그래머스
- SQL
- TensorFlow
- 쿠싱
- 군고구마
- 상대도수
- 분당서울대병원
- 힙
- hash
- programmers
- 사분위수
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함