Hello coders, today we are going to solve Weather Observation Station 2 HackerRank Solution in SQL.
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.
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
Your results must be in the form:
where lat is the sum of all values in LAT_N and lon is the sum of all values in LONG_W. Both results must be rounded to a scale of 2 decimal places.
Solution – Weather Observation Station 2 in SQL
select round(sum(lat_n), 2), round(sum(long_w), 2) from station;
Disclaimer: The above Problem (Weather Observation Station 2) is generated by Hacker Rank but the Solution is Provided by CodingBroz. This tutorial is only for Educational and Learning Purpose.