www.hackerrank.com/challenges/weather-observation-station-1/problem
Weather Observation Station 1 | HackerRank
Write a query to print the CITY and STATE for each attribute in the STATION table.
www.hackerrank.com
Query a list of CITY and STATE from the STATION table.
The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.
Answer
select city, state
from station;
www.hackerrank.com/challenges/weather-observation-station-2/problem
Weather Observation Station 2 | HackerRank
Write a query to print the sum of LAT_N and the sum of LONG_W separated by space, rounded to 2 decimal places.
www.hackerrank.com
Query the following two values from the STATION table:
- The sum of all values in LAT_N rounded to a scale of decimal places.
- The sum of all values in LONG_W rounded to a scale of 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 is the sum of all values in LAT_N and is the sum of all values in LONG_W. Both results must be rounded to a scale of decimal places.
select round(sum(lat_n),2), round(sum(long_w),2)
from station'SQL & DB > HackerRank SQL Problem' 카테고리의 다른 글
| [HackerRank SQL] Weather Observation Station 11, 12(MySQL) (0) | 2021.02.27 |
|---|---|
| [HackerRank SQL] Weather Observation Station 9, 10(MySQL) (0) | 2021.02.27 |
| [HackerRank SQL] Weather Observation Station 7, 8(MySQL) (0) | 2021.02.27 |
| [HackerRank SQL] Weather Observation Station 5, 6(MySQL) (0) | 2021.02.27 |
| [HackerRank SQL] Weather Observation Station 3, 4(MySQL) (0) | 2021.02.27 |