cs
 

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 함수를 활용해서 뒤의 소수점을 조절 가능 하다.

+ Recent posts