Milky's note

[HackerRank](E) Weather Observation Station 17 본문

SQL/SQL 코딩 테스트-HackerRank

[HackerRank](E) Weather Observation Station 17

밀뿌 2022. 3. 25. 17:48

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

 

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

 

[문제]

Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in STATION is greater than 38.7880. 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.

 

 

[답]

- mysql

select round(long_W,4) from station
where lat_n > 38.7880
order by lat_n
limit 1
Comments