HackerRank/SQL

[hackerrank] Weather Observation Station 15

예쁜꽃이피었으면 2022. 8. 31. 11:34

[hackerrank] Prepare > SQL > Aggregation > Weather Observation Station 15

 

[문제]

Query the Western Longitude (LONG_W) for the largest Northern Latitude (LAT_N) in STATION that is less 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.

 

[MYSQL]

 

 

[ORCALE]

select round(long_w,4)
from (
    select lat_n , long_w
    from station
    where lat_n < 137.2345
    order by lat_n desc
    )
where rownum = 1;

 

 

 

 

 

 

반응형