본문 바로가기

Language/SQL

[HackerRank][SQL][Aggregation] Weather Observation Station 17 - 컴도리돌이

728x90
 

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


Problem

Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in STATION is greater than 38.7780 . Round your answer to 4 decimal places.

-> lat_n 이 38.7780보다 큰 lat_n중에서 가장 작은 값을 가진 long_w를 소수점 4번째에서 반올림하여 출력하시오.


select round(long_w,4)
from station
where lat_n > 38.7780
order by lat_n limit 1