Monday 20 February 2017

Use of distinct keyword in SQL

Query a list of CITY names from STATION with even ID numbers only. You may print the results in any order, but must exclude duplicates from your answer.
Input Format
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
query:

select distinct city
from station
where MOD(id,2)=0;

No comments:

Post a Comment