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.
[My Answer]
SELECT ROUND(long_w, 4)
FROM STATION
WHERE lat_n < 137.2345
ORDER BY lat_n desc
limit 1
계속 비슷한거.
상위 하나 뽑는거면 내림차순 해주고 가장 위의 하나 뽑는게 빠르고 편하다.
Rank 쓰는게 아니면
'Code Problems > SQL_ HackerRank' 카테고리의 다른 글
[HackerRank] Weather Observation Station 17 (0) | 2021.11.14 |
---|---|
[HackerRank] Weather Observation Station 16 (0) | 2021.11.14 |
[HackerRank] Weather Observation Station 14 (0) | 2021.11.11 |
[HackerRank] Weather Observation Station 13 (0) | 2021.11.11 |
[Hacker Ranker] Weather Observation Station 2 (1) | 2021.11.07 |