0
When trying to resolve a platform bank issue hackerrank I could not understand the answer after having found in the discussion wing.
The question says:
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.
Make a query of names of the cities in the table STATION with only identification ID numbers. You can display the result in any order, but delete duplicate answers.
Description of the STATION table
The answer marked as right would be
SELECT DISTINCT city FROM station WHERE (id % 2) = 0;
My question is about the WHERE (id % 2 ) = 0
, I didn’t understand the answer, at first only the DISTINCT
solves the question, someone can explain?
Have another way in Mysql?
Translation error: "with Even ID" translates to "with par ID". Your translation ignored this use of
even
, which is opposed toodd
(unique)– Jefferson Quesado
If you had Even number the translation would have been done correctly, thank you for the remark @Jeffersonquesado =) I passed beaten =(
– Jonathas B. C.