본 내용은 데이터리안 '데이터 분석을 위한 고급 SQL 문제풀이'을 수강하며 작성한 내용입니다.
https://www.hackerrank.com/challenges/weather-observation-station-17/problem?isFullScreen=true
Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in STATION is greater than . Round your answer to 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 (
SELECT MIN(lat_n)
FROM station
) sub
AND sub > 38.7780
: 에러뜸! 서브쿼리 활용해서 풀어봤는데, 서브쿼리 식구현이 아직 완전히 납득이 안되는 것 같다.
SELECT ROUND(long_w, 4)
FROM station
WHERE lat_n >38.7780
ORDER BY lat_n
LIMIT 1
배운점