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

Bummer! first_published should be descending. Isn't that what I have?

Reporting with SQL Challenge Task 2 of 3

SELECT * FROM books ORDER BY first_published DESC, title ASC;

I received a Bummer message as stated in the question title.

What am I doing wrong?

Sorry that would have been a smart thing to do.

https://teamtreehouse.com/library/reporting-with-sql/ordering-limiting-and-paging-results/ordering-results.

Could you share a link to the task?

2 Answers

Steven Parker
Steven Parker
231,127 Points

The message may be a bit confusing, but the issue is that the challenge did not ask for the title to be used in the ordering.

For best results with the challenges, be careful to follow the instructions and to not do anything "extra".

Thank you Steven. Tried it without ordering title but this is what I got. First_published was in descending order in database. - Maybe I'm still not reading the challenge correctly.

Bummer! Your query didn't order the books from the books table in the correct order!

SELECT title, first_published FROM books ORDER BY first_published DESC;

Steven Parker
Steven Parker
231,127 Points

You had the SELECT clause right the first time.

I tried this and it worked - select * from books order by first_published desc;

Nice! You're doing great!

Thanks to all!

Chitra, thank you! I guess I had a blind spot when it said "Select all columns". I tried it and it works. Thanks again. Marsha