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 trial

Databases

Shad Hossain
Shad Hossain
3,932 Points

Create an alphabetical list of fruits that are NOT considered a vegetable

Create an alphabetical list of fruits that are NOT considered a vegetable

Shad Hossain
Shad Hossain
3,932 Points

This is my code

SELECT FruitID, Name FROM Fruit EXCEPT SELECT Name FROM Vegetable WHERE Name = "Vegetable" ORDER BY Name;

what am I doing wrong?

1 Answer

Steven Parker
Steven Parker
229,670 Points

This is a bit of a guess.

Without seeing the course page I'm running on faded memory, but I think you might not need to select the FruitID, and you probably also do not need that WHERE clause.

SELECT Name FROM Fruit EXCEPT SELECT Name FROM Vegetable ORDER BY Name;

If that's not it, please provide a link to the course page to enable a more complete analysis.