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

General Discussion

Scott Paterson
Scott Paterson
26,869 Points

Database Foundations Limiting the result code challenge

Hi Team Is there a problem currently with this quiz? here is an example of my code which was to select between actors 101 and 200.

SELECT * FROM actors LIMIT 200 OFFSET 100;
Scott Paterson
Scott Paterson
26,869 Points

Or am i being a silly sausage and have to look again?

Scott

3 Answers

Scott Paterson
Scott Paterson
26,869 Points

Problem Solved just 1 digit had to change.

geoffrey
geoffrey
28,736 Points

Hello, I know this post is 2 months old, but I'm stuck with the same question, what I don't get is the fact I test my queries inside Mysql Workbench, both work (with offset and whitout) and that still doesn't work here...

As you I typed this :

SELECT * FROM actors LIMIT 200 OFFSET 100;

and I've as well tested this way

SELECT * FROM actors LIMIT 100,200;

If you could enlight me on the way you solved it, you stated by changing one digit, but which one ? And above all, why would I have to change any digit ? Because It looks good to me to type the queries as we did !

I'm probably being that silly sausage ;)

Thank you !

EDIT: Well, after taking a little rest, and getting back on the exercise, I've found immediatly the answer, and I understand now why you told that was a problem with one digit.

The answser is:

SELECT * FROM actors LIMIT 100,100;

Simply logical. As we start counting at 101 and we need to 200. that was obvious.

Nicholas Wright
Nicholas Wright
17,497 Points

THANK GOD you posted this. I was stuck on this code challenge for like 30 minutes.