We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Weather Observation Station 3
Weather Observation Station 3
Sort by
recency
|
1861 Discussions
|
Please Login in order to post a comment
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.
Hi, i don't really understand why we're using the modulo in this case, can someone explain pls ?
SELECT DISTINCT CITY FROM STATION WHERE MOD(ID,2)=0;
ngoccth_SQL SERVER: SELECT DISTINCT city FROM Station WHERE id%2 = 0
The easy way is this Select Distinct(CITY) from STATION Where ID%2 = 0