[HackerRank] Weather Observation Station 2

mzzzi·2022년 4월 21일
0

HackerRank SQL

목록 보기
34/52
post-thumbnail

MySQL > Weather Observation Station 2


Weather Observation Station 2
Query the following two values from the STATION table:

The sum of all values in LAT_N rounded to a scale of 2 decimal places.
The sum of all values in LONG_W rounded to a scale of 2 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.

Output Format

Your results must be in the form:

lat lon

where lat is the sum of all values in LAT_N and is lon the sum of all values in LONG_W. Both results must be rounded to a scale of 2 decimal places.


My Answer


SELECT ROUND(SUM(LAT_N),2), ROUND(SUM(LONG_W),2)
FROM STATION ;
profile
무럭무럭 성장하라🌳

0개의 댓글