Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions 2_SQL/2_HackerRank/Mysql/1. Easy/Weather Observation Station 1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Date : 2022.04.05
Update : 2022.04.05
Source : Weather Observation Station 1.sql
Purpose : SELECT
url : https://www.hackerrank.com/challenges/weather-observation-station-1/problem?isFullScreen=true
Author : 김학진 (mildsalmon)
Email : mildsalmon@gamil.com
*/

SELECT city, state
FROM station
;
14 changes: 14 additions & 0 deletions 2_SQL/2_HackerRank/Mysql/1. Easy/Weather Observation Station 3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
Date : 2022.04.05
Update : 2022.04.05
Source : Weather Observation Station 3.sql
Purpose : SELECT / MOD
url : https://www.hackerrank.com/challenges/weather-observation-station-3/problem?isFullScreen=true
Author : 김학진 (mildsalmon)
Email : mildsalmon@gamil.com
*/

SELECT DISTINCT(city)
FROM station
WHERE MOD(ID, 2) = 0
;
13 changes: 13 additions & 0 deletions 2_SQL/2_HackerRank/Mysql/1. Easy/Weather Observation Station 4.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Date : 2022.04.05
Update : 2022.04.05
Source : Weather Observation Station 4.sql
Purpose : SELECT / COUNT / DISTINCT
url : https://www.hackerrank.com/challenges/weather-observation-station-4/problem?isFullScreen=true
Author : 김학진 (mildsalmon)
Email : mildsalmon@gamil.com
*/

SELECT COUNT(city) - COUNT(DISTINCT(city))
FROM station
;