Solve SQL Code Challenges
A special-purpose language designed for managing data held in a relational database.
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.
[My Answer]
SELECT ROUND(sum(lat_n),4)
FROM STATION
WHERE lat_n > 38.7880 and lat_n < 137.2345
Round 함수를 활용해서 뒤의 소수점을 조절 가능 하다.
'Code Problems > SQL_ HackerRank' 카테고리의 다른 글
[HackerRank] Weather Observation Station 15 (0) | 2021.11.11 |
---|---|
[HackerRank] Weather Observation Station 14 (0) | 2021.11.11 |
[Hacker Ranker] Weather Observation Station 2 (1) | 2021.11.07 |
[Hacker Rank] Top Earners (1) | 2021.11.07 |
[HackerRank] The Blunder (0) | 2021.11.07 |