융무의 기술블로그
article thumbnail

https://www.hackerrank.com/challenges/weather-observation-station-16/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&h_r=next-challenge&h_v=zen

 

Weather Observation Station 16 | HackerRank

Query the smallest of STATION's Northern Latitudes that is greater than 38.7780, and round to 4 decimal places

www.hackerrank.com

Query the smallest Northern Latitude (LAT_N) from STATION that 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 the smallest LAT_N ==> SELECT MIN(LAT_N)
  • round answer to 4 deciaml places ==> SELECT ROUND(MIN(LAT_N), 4)
  • from STATION table ==> FROM STATION
  • greater than 38.7880 ==> WHERE LAT_N > 38.7780
SELECT ROUND(MIN(LAT_N), 4) 
FROM STATION 
WHERE LAT_N > 38.7780;
SELECT ROUND(LAT_N,4)
FROM STATION
WHERE LAT_N > 38.7780 
ORDER BY LAT_N LIMIT 1;

profile

융무의 기술블로그

@융무

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