융무의 기술블로그
article thumbnail

https://www.hackerrank.com/challenges/weather-observation-station-15/problem?h_r%5B%5D=next-challenge&h_r%5B%5D=next-challenge&h_r%5B%5D=next-challenge&h_r%5B%5D=next-challenge&h_r%5B%5D=next-challenge&h_r%5B%5D=next-challenge&h_r%5B%5D=next-challenge&h_v%5B%5D=zen&h_v%5B%5D=zen&h_v%5B%5D=zen&h_v%5B%5D=zen&h_v%5B%5D=zen&h_v%5B%5D=zen&h_v%5B%5D=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.

 

  • query LONG_W ==> SELECT LONG_W
  • round answer to 4 decimal places ==> SELECT ROUND(LONG_W, 4)
  • in STATION table ==> FROM STATION
  • LAT_N less than 137.2345 ==> WHERE LAT_N < 137.2345
  • for the largest LAT_N ==> ORDER BY LAT_N DESC LIMIT 1
SELECT ROUND(LONG_W,4)
FROM STATION
WHERE LAT_N < 137.2345 
ORDER BY LAT_N DESC LIMIT 1;

profile

융무의 기술블로그

@융무

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!