HR-SQL Weather Observation Station 19

1 개요[ | ]

HR-SQL Weather Observation Station 19
해커랭크 SQL
문제 DB2 MS SQL MySQL Oracle
HR-SQL Aggregation e
HR-SQL Revising Aggregations - The Count Function
HR-SQL Revising Aggregations - The Sum Function
HR-SQL Revising Aggregations - Averages
HR-SQL Average Population
HR-SQL Japan Population
HR-SQL Population Density Difference
HR-SQL The Blunder
HR-SQL Top Earners
HR-SQL Weather Observation Station 2
HR-SQL Weather Observation Station 13
HR-SQL Weather Observation Station 14
HR-SQL Weather Observation Station 15
HR-SQL Weather Observation Station 16
HR-SQL Weather Observation Station 17
HR-SQL Weather Observation Station 18
HR-SQL Weather Observation Station 19
HR-SQL Weather Observation Station 20

2 MySQL[ | ]

SELECT ROUND( SQRT(POW(a-c,2)+POW(b-d,2)), 4 )
FROM (
    SELECT
    MIN(LAT_N) AS a, MIN(LONG_W) AS b,
    MAX(LAT_N) AS c, MAX(LONG_W) AS d
    FROM STATION
) t;
# 184.1616
SELECT ROUND(SQRT(
POW(
    (SELECT MAX(LAT_N) FROM STATION) - (SELECT MIN(LAT_N) FROM STATION)
,2)
+POW(
    (SELECT MAX(LONG_W) FROM STATION) - (SELECT MIN(LONG_W) FROM STATION)
,2)
), 4);
# 184.1616
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}