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 trialEdward Li
373 PointsWhat should I write to retrieve 'Science Fiction' from books?
Bummer! Your query needs to retrive the earliest 'Science Fiction' book from the books
table. Get Help Try Again
1 Answer
Steven Parker
231,261 PointsWithout seeing what you were trying or a link to your challenge, I can't be specific, but here's some general hints:
- When retrieving the "earliest" of something, you'll want to
ORDER BY
the date it was issued, and thenLIMIT
your output to just 1 row. - When looking for things of a particular type, you will use a
WHERE
clause comparing the column with the type (perhaps genre in this case?) to the desired type ('Science Fiction').
Hopefully that will get you going, or you can post more info.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Edward,
Can you link to the challenge and post what query you are trying?