융무의 기술블로그
article thumbnail

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

 

Weather Observation Station 17 | HackerRank

Query the Western Longitude for the smallest value of the Northern Latitudes greater than 38.7780 in STATION and round to 4 decimal places.

www.hackerrank.com

Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in STATION is greater than 38.7780. 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
  • greater than 38.7780 ==> WHERE LAT_N > 38.7780
  • for the smallest LAT_N ==> ORDER BY LAT_N LIMIT 1
SELECT ROUND(LONG_W, 4) 
FROM STATION 
WHERE LAT_N > 38.7780 
ORDER BY LAT_N LIMIT 1;

 

profile

융무의 기술블로그

@융무

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