CodingSpace

[HackerRank/SQL] Aggregation - Weather Observation Station 15 본문

HackerRank/SQL

[HackerRank/SQL] Aggregation - Weather Observation Station 15

개발자_조이킴 2022. 8. 1. 23:36

Problem. Basic Select - Weather Observation Station 15


Link.

https://www.hackerrank.com/challenges/weather-observation-station-15/problem?isFullScreen=true 

 

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


Description.

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.

 

STATION 테이블


Key Point. 

ROUND,

 

MAX,


My Answer. 

SELECT
ROUND(LONG_W, 4)
FROM STATION
WHERE LAT_N = (SELECT MAX(LAT_N) FROM STATION WHERE LAT_N < 137.2345);

References. 

Comments