Weather Observation Station 19 sql – Hacker Rank Solution

Weather Observation Station 19 sql - Hacker Rank Solution
Weather Observation Station 19 – Hacker Rank Solution

Problem

Consider  and  to be two points on a 2D plane where  are the respective minimum and maximum values of Northern Latitude (LAT_N) and  are the respective minimum and maximum values of Western Longitude (LONG_W) in STATION.

Query the Euclidean Distance between points  and  and format your answer to display  decimal digits.

Input Format

The STATION table is described as follows:

1449345840 5f0a551030 Station

where LAT_N is the northern latitude and LONG_W is the western longitude.



Weather Observation Station 19 SQL – Hacker Rank Solution

SELECT ROUND(SQRT(POW(MIN(LAT_N)-MAX(LAT_N), 2) +
                  POW(MIN(LONG_W)-MAX(LONG_W), 2)), 4) FROM STATION;

Disclaimer: The above Problem (Weather Observation Station 19) generated by Hackerrank but the Solution is Provided by Chase2Learn. This tutorial is only for Educational and Learning purposes. Authority if any of the queries regarding this post or website fill the following contact form thank you.

Leave a Comment