융무의 기술블로그
article thumbnail

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

 

Weather Observation Station 13 | HackerRank

Query the sum of Northern Latitudes having values greater than 38.7880 and less than 137.2345, truncated to 4 decimal places.

www.hackerrank.com

Query the sum of Northern Latitudes (LAT_N) from STATION having values greater than 38.7880 and less than 137.2345. Truncate 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.

 

  • sum of LAT_N ==> SUM(LAT_N)
  • truncate answer to 4 decimal places ==> SELECT TRUNCATE(SUM(LAT_N), 4)
  • from STATION table ==> FROM STATION
  • values greater than 38.7880 and less than 137.2345 ==>
    WHERE LAT_N > 38.7880 AND LAT_N < 137.2345
SELECT TRUNCATE(SUM(LAT_N),4)
FROM STATION
WHERE LAT_N > 38.7880 AND LAT_N < 137.2345

 

profile

융무의 기술블로그

@융무

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