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 trialLuke Dawes
9,739 PointsChallenge Task, 2 of 2: Am I wrong, or is the quiz?
Hi all,
The challenge is:
"Get the 11th to 30th movie from the movies table. (Again no need to order the results)."
I'm putting in:
select * from movies limit 10 offset 19;
My logic is that I'm starting from the 10th index (starting at 0 gets us to 11 in ten increments) and I'm looking to return 19 results (from the 11th movie to the 30th, inclusive). Where am I going wrong here?
1 Answer
Iain Simmons
Treehouse Moderator 32,305 PointsYou've got limit
and offset
mixed up in your query. Your logic is correct, so just swap the numbers in your query... actually you might need limit to be 20, not 19, if you want to include the 11th and 30th rows.
Luke Dawes
9,739 PointsLuke Dawes
9,739 PointsThanks, Iain! I knew it'd be something tiny like that. Cheers!