Weather Observation Station 3 HackerRank Solution SQL

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:

SOURCE: Hackerrank.com

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

Weather Observation Station 3 HackerRank Solution SQL

SELECT DISTINCT City
FROM Station
WHERE MOD(Id,2) = 0
ORDER BY City;

Attempthttps://www.hackerrank.com/challenges/weather-observation-station-3/problem

Leave a Comment