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

Development Tools

Luke Dawes
Luke Dawes
9,739 Points

Challenge 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

You'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
Luke Dawes
9,739 Points

Thanks, Iain! I knew it'd be something tiny like that. Cheers!