조컴퓨터

hackerrank Weather Observation Station 3 본문

HackerRank/SQL

hackerrank Weather Observation Station 3

챠오위 2021. 1. 30. 23:38

 

 

1) MOD(id, 2) = 0

 

1-1) 

SELECT city

FROM STATION

WHERE MOD(id, 2) = 0;

 

1-1) 결과

 

 

2) 중복 체크

 

2-1)

SELECT city

FROM STATION
WHERE MOD(id, 2) = 0

GROUP BY city;

 

2-1) 결과

 

 

SUCCESS!!

 

 

 

 

 

'HackerRank > SQL' 카테고리의 다른 글

hackerrank Weather Observation Station 6  (0) 2021.01.31
hackerrank Weather Observation Station 5  (0) 2021.01.31
hackerrank Symmetric Pairs  (0) 2021.01.18
hackerrank Type of Triangle  (0) 2021.01.18
hackerrank Top Earners  (0) 2021.01.17