[HackerRank] Weather Observation Station 5
2022. 6. 8. 13:02ㆍSQL
SELECT city, LENGTH(city)
FROM station
ORDER BY 2 , 1
LIMIT 1 ;
SELECT city, LENGTH(city)
FROM station
ORDER BY 2 DESC , 1
LIMIT 1 ;
city의 이름의 길이가 가장 짧은 거, 가장 긴거 추출 쿼리 작성
하나로 작성할 수는 없었을까?
'SQL' 카테고리의 다른 글
[LeetCode] 1050. Actors and Directors Who Cooperated At Least Three Times (0) | 2022.06.09 |
---|---|
[LeetCode] 197. Rising Temperature (0) | 2022.06.09 |
[HackerRank] Weather Observation Station 3 (0) | 2022.06.07 |
[LeetCode] 178. Rank Scores (0) | 2022.06.07 |
[LeetCode] 184. Department Highest Salary (0) | 2022.06.07 |