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