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 |
Tags
- 데이터분석
- forecast
- 당신의 인생이 왜 힘들지 않아야 한다고 생각하십니까
- 딥러닝
- SKU Consolidation
- tensorflow
- ABC Analysis
- 코딩테스트
- Product Demand
- 신경쓰기의 기술
- 프로그래머스
- Gaimification
- TensorFlowGPU
- MS SQL Server
- oracle
- leetcode
- SQL
- eda
- 웨어하우스 보관 최적화
- ModelCheckPoint
- Inventory Optimization
- Labor Management System
- ProfileReport
- HackerRank
- 파이썬
- 피그마인디언
- 코딩테스트연습
- kaggle
- pandas profiling
- MySQL
Archives
- Today
- Total
오늘도 배운다
Weather Observation Station 5 / Hacker Rank, SQL, MySQL 본문
코딩테스트연습(SQL)
Weather Observation Station 5 / Hacker Rank, SQL, MySQL
LearnerToRunner 2022. 11. 30. 10:54문제
Query the two cities in STATION with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically.The STATION table is described as follows:

제출답안(MySQL)
(SELECT city, LENGTH(city) FROM station ORDER BY 2 DESC, 1 LIMIT 1)
UNION
(SELECT city, LENGTH(city) FROM station ORDER BY 2, 1 LIMIT 1)
문제 바로가기(MySQL)
728x90
'코딩테스트연습(SQL)' 카테고리의 다른 글
| Weather Observation Station 7 / HackerRank, SQL, MySQL (0) | 2022.11.30 |
|---|---|
| Weather Observation Station 6 / HackerRank, SQL, MySQL (0) | 2022.11.30 |
| Weather Observation Station 4 / HackerRank, SQL, MySQL (0) | 2022.11.30 |
| Weather Observation Station 3 / HackerRank, SQL, MySQL (0) | 2022.11.30 |
| 상품을 구매한 회원 비율 구하기 / 프로그래머스, SQL, MySQL 코딩테스트 연습 JOIN (0) | 2022.11.29 |
Comments