Databases Querying Relational Databases Set Operations Set Operations

Alejandro Romero Parra
Alejandro Romero Parra
1,593 Points

GET a Bummer IDK why

SELECT Name FROM Fruit WHERE Name <"K" UNION SELECT Name FROM Vegetable WHERE Name <"K" ORDER BY Name ASC;

this is my code, i think is what they asking for, but still get a bummer. i also try adding like Fruit.Name and even add the IDs columns and still nothing, i dont really can see the problem here.

1 Answer

Hi! You need to select between A and L because it will not include K if you don't do it with L.

select Name FROM Fruit WHERE Name Between 'A' AND 'L' UNION select Name FROM Vegetable WHERE Name Between 'A' AND 'L'

Alejandro Romero Parra
Alejandro Romero Parra
1,593 Points

yeah i was missing the "k" ones, that was silly, thanks by the way. :)

Steven Parker
Steven Parker
201,297 Points

Note that "BETWEEN" would include "L" though you can get by with it this time.

But there's another test you could use that would only include words that come before "L".