혜온의 이것저것

[HackerRank] Weather Observation Station 15 (MySQL) 본문

Data Analysis/SQL

[HackerRank] Weather Observation Station 15 (MySQL)

혜온 :) 2022. 8. 16. 11:23

https://www.hackerrank.com/challenges/weather-observation-station-15/problem?isFullScreen=true&h_r=next-challenge&h_v=zen 

 

Weather Observation Station 15 | HackerRank

Query the Western Longitude for the largest Northern Latitude under 137.2345, rounded to 4 decimal places.

www.hackerrank.com

 

문제

Query the Western Longitude (LONG_W) for the largest Northern Latitude (LAT_N) in STATION that is less than 137.2345. Round your answer to 4 decimal places.

Input Format

The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.

 

풀이
select round(long_w,4)
from station
where lat_n = (select max(lat_n) 
               from station 
               where lat_n<137.2345)
Comments