Im between cherry

Hackerrank | MySQL | Weather Observation Station 17 본문

데이터분석/practice_query

Hackerrank | MySQL | Weather Observation Station 17

meal 2020. 8. 29. 11:18

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

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

 

 

SELECT ROUND(LONG_W,4)
FROM STATION
WHERE LAT_N IN (SELECT MIN(LAT_N)
				FROM STATION
				WHERE LAT_N > 38.7780)
SELECT round(Long_w,4)
FROM (
    SELECT *
    FROM Station
    WHERE Lat_n > 38.7780
) as sub
ORDER BY Lat_n
Limit 1
Comments