Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialabdel ahbe
Courses Plus Student 1,531 PointsSELECT Name FROM Fruit WHERE Name <= 'K' UNION SELECT Name FROM Vegetable WHERE Name <= 'K'; Why is my query wrong?
SELECT Name FROM Fruit WHERE Name <= 'K' UNION SELECT Name FROM Vegetable WHERE Name <= 'K';
2 Answers
Rohald van Merode
Treehouse StaffHey abdel ahbe 👋
Your query is supposed to be working as expected! I had a quick look at how the tests for this challenge are setup and it's currently expecting you to test for < 'L'
rather than using <= 'K'
. If you try that the test should be passing as expected:
SELECT Name FROM Fruit WHERE Name < 'L' UNION SELECT Name FROM Vegetable WHERE Name < 'L';
Hope this clears things up! Sorry for the inconvenience, I'll make note of this for the content team to have this adjusted 🙂
abdel ahbe
Courses Plus Student 1,531 PointsYup comparing against 'L' works as expected. Thanks!