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 trialThomas Ma
15,199 Pointsawait Book.({ : { author: 'Sylvia Plath' } });
Can someone please give me the answer?
1 Answer
Dane Parchment
Treehouse Moderator 11,077 PointsOkay the it's prompting us to do: SELECT * FROM Books WHERE author = 'Sylvia Plath';
So, what we need to do is select *
from books. That *
means everything, so that tells us we need to find all of the books. So that gives us the first blank to fill in: findAll
await Book.findAll({ : { author: 'Sylvia Plath' } });
Next we need to filter something, what? The author. So we need to find all the books where the author is equal to Sylvai Plath.
That gives us the second blank to fill in: where
await Book.findAll({ where: { author: 'Sylvia Plath' } });
Hope that helps.