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 Database Foundations Reading Data from Databases with SQL Limiting the Result Set

Anthony Perera
Anthony Perera
9,185 Points

The Answers I typed: SELECT * FROM actors LIMIT 100, 99; which is wrong, any suggestions?

Question: Get the 101st to 200th actor from the actors table.

I also tried: SELECT * FROM actors LIMIT 99 OFFSET 100;

3 Answers

Jeff Lemay
Jeff Lemay
14,268 Points

LIMIT is off. There are 100 numbers from 101 to 200, not 99.

Anthony Perera
Anthony Perera
9,185 Points

Thanks! yeah my bad, having one of those days...

Database Foundations

Challenge Task 1 of 2

Get the 101st to 200th actor from the actors table. Be sure to return every column. Also, there's no need to use any ordering.

SELECT * FROM actors LIMIT 100,100;

Challenge Task 2 of 2

Get the 11th to 30th movie from the movies table. Be sure to return every column. Also, there's no need to order the results.

Type in your command below, then press Enter.

SELECT * FROM movies LIMIT 20 OFFSET 10;

GREAT ARY,

SELECT * FROM actors LIMIT 100 OFFSET 100;