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