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
'Algorithm > SQL' 카테고리의 다른 글
[SQL][HackerRank] Weather Observation Station 15 (0) | 2020.06.12 |
---|---|
[SQL][HackerRank] Weather Observation Station 14 (0) | 2020.06.12 |
[SQL][HackerRank] Weather Observation Station 2 (0) | 2020.06.12 |
[SQL][HackerRank] Top Earners (0) | 2020.06.12 |
[SQL][HackerRank] Population Density Difference (0) | 2020.06.11 |