www.hackerrank.com/challenges/weather-observation-station-17/problem
Weather Observation Station 17 | HackerRank
Query the Western Longitude for the smallest value of the Northern Latitudes greater than 38.7780 in STATION and round to 4 decimal places.
www.hackerrank.com
Answer
select round(long_w,4)
from station
where lat_n > 38.7780
order by lat_n
limit 1
www.hackerrank.com/challenges/weather-observation-station-18/problem
Weather Observation Station 18 | HackerRank
Query the Manhattan Distance between two points, round or truncate to 4 decimal digits.
www.hackerrank.com
Answer -> 맨허튼거리 구현
select round(abs(max(lat_n) - min(lat_n)) + abs(max(long_w) - min(long_w)),4)
from station
728x90
반응형
'SQL & DB > HackerRank SQL Problem' 카테고리의 다른 글
[HackerRank SQL] The Report (0) | 2021.03.01 |
---|---|
[HackerRank SQL] Weather Observation Station 19, 20(MySQL) (0) | 2021.03.01 |
[HackerRank SQL] Weather Observation Station 15, 16(MySQL) (0) | 2021.03.01 |
[HackerRank SQL] Weather Observation Station 13, 14(MySQL) (0) | 2021.03.01 |
[HackerRank SQL] Top Earners (0) | 2021.02.27 |