일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- 그룹바이
- 짝수
- 카이제곱분포
- airflow
- SQL코테
- 표준편차
- update
- CASE
- 논문리뷰
- 코딩테스트
- Statistics
- sql
- SQL 날짜 데이터
- 서브쿼리
- 자연어 논문 리뷰
- torch
- sigmoid
- NLP
- HackerRank
- t분포
- inner join
- nlp논문
- leetcode
- GRU
- 자연어처리
- 자연어 논문
- Window Function
- LSTM
- 설명의무
- MySQL
- Today
- Total
HAZEL
[SQL : HackerRank] Weather Observation Station 3 / Weather Observation Station 19 본문
[SQL : HackerRank] Weather Observation Station 3 / Weather Observation Station 19
Rmsid01 2021. 3. 1. 12:461] Weather Observation Station 3
>> 문제
Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
>> 문제 푼 코드
SELECT distinct city
FROM STATION
WHERE id % 2 = 0
www.hackerrank.com/challenges/weather-observation-station-3/problem
Weather Observation Station 3 | HackerRank
Query a list of unique CITY names with even ID numbers.
www.hackerrank.com
2] Weather Observation Station 19
Consider P1(a,c) and P2(b,d) to be two points on a 2D plane where (a,b) are the respective minimum and maximum values of Northern Latitude (LAT_N) and (c,d) are the respective minimum and maximum values of Western Longitude (LONG_W) in STATION.
Query the Euclidean Distance between points P1 and P2 and format your answer to display 4 decimal digits.
Input Format
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
>> 문제 푼코드
SELECT round(SQRT(POWER(min(lat_n) - max(lat_n),2) +
POWER(min(long_w)- max(long_w),2)),4)
from station
www.hackerrank.com/challenges/weather-observation-station-19/problem
Weather Observation Station 19 | HackerRank
Query the Euclidean Distance between two points and round to 4 decimal digits.
www.hackerrank.com
'DATA ANALYSIS > SQL' 카테고리의 다른 글
[SQL : HackerRank] Binary Tree Nodes (0) | 2021.03.03 |
---|---|
[SQL : LEFT JOIN ] HackerRank : Placements (0) | 2021.03.02 |
[SQL : HackerRank] Top Competitors (0) | 2021.02.28 |
[SQL : HackerRank] Population Density Difference , Weather Observation Station 11, Weather Observation Station 13 (0) | 2021.02.27 |
[SQL : select 서브쿼리, join ] HackerRank : New Companies (0) | 2021.02.26 |