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
- Gaimification
- SKU Consolidation
- MS SQL Server
- 웨어하우스 보관 최적화
- kaggle
- 딥러닝
- SQL
- eda
- forecast
- ModelCheckPoint
- Labor Management System
- 신경쓰기의 기술
- 피그마인디언
- Inventory Optimization
- HackerRank
- TensorFlowGPU
- 코딩테스트연습
- ProfileReport
- leetcode
- pandas profiling
- Product Demand
- 파이썬
- 당신의 인생이 왜 힘들지 않아야 한다고 생각하십니까
- ABC Analysis
- tensorflow
- oracle
- 데이터분석
- 프로그래머스
- 코딩테스트
- MySQL
Archives
- Today
- Total
오늘도 배운다
Weather Observation Station 18 / HackerRank, SQL, MySQL 본문
코딩테스트연습(SQL)
Weather Observation Station 18 / HackerRank, SQL, MySQL
LearnerToRunner 2022. 12. 26. 00:45문제
Consider P1(a,b) and P2(c, d) to be two points on a 2D plane.
'a' happens to equal the minimum value in Northern Latitude (LAT_N in STATION).
'b' happens to equal the minimum value in Western Longitude (LONG_W in STATION).
'c' happens to equal the maximum value in Northern Latitude (LAT_N in STATION).
'd' happens to equal the maximum value in Western Longitude (LONG_W in STATION).
Query the Manhattan Distance between points and and round it to a scale of decimal places.
제출답안(MySQL)
-- Manhattan Distance = |x1-x2| + |y1-y2|
SELECT ROUND(ABS(MIN(lat_n)-MAX(lat_n)) + ABS(MIN(long_w)-MAX(long_w)), 4)
FROM station
문제 바로가기(MySQL)
728x90
'코딩테스트연습(SQL)' 카테고리의 다른 글
Weather Observation Station 20 / HackerRank, SQL, MySQL (0) | 2022.12.27 |
---|---|
Weather Observation Station 19 / HackerRank, SQL, MySQL (0) | 2022.12.26 |
Weather Observation Station 17 / HackerRank, SQL, MySQL (0) | 2022.12.26 |
Weather Observation Station 16 / HackerRank, SQL, MySQL (0) | 2022.12.25 |
Weather Observation Station 15 / HackerRank, SQL, MySQL (0) | 2022.12.25 |
Comments