Hello coders, today we are going to solve Weather Observation Station 16 HackerRank Solution in SQL.
![Weather Observation Station 16](https://www.codingbroz.com/wp-content/uploads/2021/05/Weather-Observations-Station-16-in-SQL-HackerRank-Solution.png)
Problem
Query the smallest Northern Latitude (LAT_N) from STATION that is greater than 38.7780. Round your answer to 4 decimal places.
Input Format
The STATION table is described as follows:
Field | Type |
---|---|
ID | NUMBER |
CITY | VARCHAR2(21) |
STATE | VARCHAR2(2) |
LAT_N | NUMBER |
Long_W | NUMBER |
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution – Weather Observation Station 16 in SQL
MySQL
select round(min(lat_n), 4) from station where lat_n > 38.7780;
Disclaimer: The above Problem (Weather Observation Station 16) is generated by Hacker Rank but the Solution is Provided by CodingBroz. This tutorial is only for Educational and Learning Purpose.
SELECT ROUND(MIN(LAT_N), 4) FROM STATION WHERE LAT_N > 38.7780;