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

Problem with challenge

I still dont understand how to do this

The first one someone helped me in the forums but actually I didn't understand what do they want?

http://teamtreehouse.com/library/database-foundations/reading-data-from-databases-with-sql/limiting-the-result-set

3 Answers

Jason Montoya
Jason Montoya
6,550 Points

Dustin,

I'm sorry if my previous answer wasn't an explanation enough.

Hopefully this explanation will help in regards to the second question.

First, to SELECT everything in the movies table from the 11th cell to the 30th cell, you'll have to set the first part of the parameter to 10 (because we start at 0).

Then to select everything in between the 11th and the 30th cell you can just apply some basic math and subtract the original 10 from 30 to give you the second number in the parameter (20).

Hope this helps

Thanks man now I got how it works

Jason Montoya
Jason Montoya
6,550 Points

Dustin,

I got the following to work:

SELECT * FROM actors LIMIT 100, 100;

Since 101 is really position 100 in the table, that will get put in the first part of the LIMIT parameter. Next, you have to set the max-limit to the 100 following fields in the table. This will give you all the fields from 101 to 200.

Hope this helps

This one I did I am talking about the second one

Jason Montoya
Jason Montoya
6,550 Points

Dustin,

I won't give you the answer to the second question, but if you set it up the same by just changing a few parameters, you should pass that part as well.

Cheers

I want the explanation not the answer I didn't understand