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

Databases Reporting with SQL Ordering, Limiting and Paging Results Limiting Results

4 Answers

Rick Gleitz
Rick Gleitz
47,838 Points

Hi Jason,

I'm not sure from your statement where exactly you're going astray, but I'll try to help anyway.

After the standard selection from the books table you are going to use the WHERE keyword for the genre column, then the ORDER BY keyword for the first_published column (which would cover the year released part), then the keyword for ascending order to start with the oldest, and limit it to a list of 5 books.

The second task is very similar, with just two changes for the genre column and the limit number.

Hope this helps.

Jason Nutt
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jason Nutt
Front End Web Development Techdegree Graduate 24,760 Points

I'm so sorry Rick. I went to sleep(unintentionally) after posting that . I meant to include the code. Thanks so much for your help on these. If you don't mind me asking, is this a hobby for you or are you working in the industry? Your knowledge and help is appreciated.

Rick Gleitz
Rick Gleitz
47,838 Points

Right now I'm just learning, have couple of non-related part-time jobs, and co-caregiver for my elderly dad, who is starting to have dementia. Oftentimes I answer these during slower times at work (not able to do much from home right now).

Jason Nutt
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jason Nutt
Front End Web Development Techdegree Graduate 24,760 Points

Well, God bless you my friend. Also, my prayers go out to you and your dad. Life is tough and dealing with mental deterioration or mental health challenges make it even more so. I commend you for being there for him. And thank you for taking the time to help me even though there are so many things that I am sure are more important right now.

Rick Gleitz
Rick Gleitz
47,838 Points

Thank you. I'm happy to do it (helping the community has the added advantage of giving me a little refresher).