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 |
31 |
Tags
- TensorFlowGPU
- SKU Consolidation
- forecast
- 코딩테스트연습
- leetcode
- 파이썬
- kaggle
- Gaimification
- 프로그래머스
- 데이터분석
- 웨어하우스 보관 최적화
- eda
- MySQL
- 피그마인디언
- HackerRank
- ModelCheckPoint
- pandas profiling
- 신경쓰기의 기술
- 당신의 인생이 왜 힘들지 않아야 한다고 생각하십니까
- tensorflow
- SQL
- Labor Management System
- oracle
- Inventory Optimization
- MS SQL Server
- 딥러닝
- ProfileReport
- Product Demand
- 코딩테스트
- ABC Analysis
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