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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Nathan Hering](https://uploads.teamtreehouse.com/production/profile-photos/4333532/micro_earth-3icon.jpg)
Nathan Hering
4,506 PointsLimit and Offset, Having trouble with these challenges
Why does it return ( Bummer! Your query needs to retrive the earliest 'Science Fiction' book from the books
table) when the challenge was to bring back the second page of results and nothing to do with the genre or first_published? I'm lost on this one. Any help would be great.
3 Answers
![Nathan Hering](https://uploads.teamtreehouse.com/production/profile-photos/4333532/micro_earth-3icon.jpg)
Nathan Hering
4,506 PointsHere's the challenge: Note: We will be writing ONLY the SQL query for this challenge. In a library database there's a books table. There's a title, author, genre and first_published column. The library database is connected to a website displaying 10 books at a time, sorted by the title alphabetically.
Write a query to bring back the second page of results.
Here's my code: SELECT title, author, genre, first_published FROM books ORDER BY title LIMIT 10 OFFSET 10;
![Simon Coates](https://secure.gravatar.com/avatar/9c452f3f160ef69f85f1ff042db63980?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Simon Coates
28,694 PointsTry here. You just need to replace the fields with a *. The message it's giving you is gibberish i think. I'm pretty sure i complained a few months back about that exact message.
![Nathan Hering](https://uploads.teamtreehouse.com/production/profile-photos/4333532/micro_earth-3icon.jpg)
Nathan Hering
4,506 PointsSo I tried:
select * from books where genre = 'Science Fiction' order by title limit 10 offset 2;
And now the result is:
Bummer! Ten books were expected. 4 were returned in the results.
I just moved on. There seems to be something wrong with this challenge.
![Simon Coates](https://secure.gravatar.com/avatar/9c452f3f160ef69f85f1ff042db63980?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Simon Coates
28,694 PointsI've seen a couple challenges where the message you get back are flat out wrong, and a couple (particularly with SQL) when the question is messed up. If you hit something that's a legitimate glitch, hit the forum, but be aware that it may flat out be a bad message or faulty question. If so, you should email treehouse about it. On one occasion, i spent a month stuck on a single challenge with incorrect instructions. I got it right in the end by assuming that they hadn't given me a complete set of information. Whether or not treehouse fixes the glitch (they tell you it's been forwarded to the teaching team), it's cathartic to vent.
![Simon Coates](https://secure.gravatar.com/avatar/9c452f3f160ef69f85f1ff042db63980?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Simon Coates
28,694 Pointsthe science fiction thing is a mistake. I already emailed treehouse about it messing students around. if you'r working on the challenge i think you're working on:
select title, author, genre, first_published from books order by title limit 10 offset 10;
gets you the science fiction message
select * from books order by title limit 10 offset 10;
does not. (and the first results you get back seem to be a genre of fantasy.)
Simon Coates
28,694 PointsSimon Coates
28,694 PointsIt's possible to link forum topics to a challenge or video. Otherwise, a URL to the video or challenge can help people verify things.