cs

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

 

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 쓰는게 아니면

+ Recent posts