Algorithm


Problem Name: Sql - Weather Observation Station 3

Problem Link: https://www.hackerrank.com/challenges/weather-observation-station-3/problem?isFullScreen=true

In this HackerRank Functions in SQL problem solution,

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.

 

 

Code Examples

#1 Code Example with SQL

Code - SQL


SELECT DISTINCT CITY
FROM STATION
WHERE MOD(ID, 2) = 0
ORDER BY CITY;
Copy The Code & Try With Live Editor
Advertisements

Demonstration


Previous
[Solved] Weather Observation Station 1 in SQL solution in Hackerrank
Next
[Solved] Weather Observation Station 4 in SQL solution in Hackerrank