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 trialAnitha Nagendra
14,076 PointsChallenge task 2 of 3
In a library database there's a books table. There's a title, author, genre and first_published column. Order the books by the most recently published books at the top. Select all columns.
SELECT * from books ORDER BY first_published DESC;
it is giving me an error!
Rahul Bandaru
933 PointsSame error
2 Answers
jcorum
71,830 PointsAnitha, I just copied your SQL into the Challenge and it worked fine:
> SELECT * from books ORDER BY first_published DESC;
id title author genre first_published
13 Armada Ernest Cline Science Fiction 2015
11 The Martian Andy Weir Science Fiction 2014
18 The Circle Dave Eggers Science Fiction 2013
12 Ready Player One Ernest Cline Science Fiction 2011
7 Harry Potter and the Deathly Hallows J.K. Rowling Fantasy 2007
6 Harry Potter and the Half-Blood Prince J.K. Rowling Fantasy 2005
5 Harry Potter and the Order of the Phoenix J.K. Rowling Fantasy 2003
9 The Universe in a Nutshell Stephen Hawking Non Fiction 2001
4 Harry Potter and the Goblet of Fire J.K. Rowling Fantasy 2000
3 Harry Potter and the Prisoner of Azkaban J.K. Rowling Fantasy 1999
2 Harry Potter and the Chamber of Secrets J.K. Rowling Fantasy 1998
1 Harry Potter and the Philosopher's Stone J.K. Rowling Fantasy 1997
8 A Brief History of Time Stephen Hawking Non Fiction 1988
19 Contact Carl Sagan Science Fiction 1985
17 Dune Frank Herbert Science Fiction 1965
16 1984 George Orwell Fiction 1949
20 Animal Farm George Orwell 1945
10 Frankenstein Mary Shelley Horror 1818
15 Emma Jane Austen Classic 1815
14 Pride and Prejudice Jane Austen Classic 1813
So something else is going on. I suggest you close your browser, and then re-open it and try again. It looks like the editor was confused. As Andrew indicated, it helps folk respond if you let us know specifically where you are in the course. The best way is to ask for help using the Ask button when you are in the challenge, because then it will put a button at the top with a link to the actual challenge.
Anitha Nagendra
14,076 PointsThank you so much. I did the same closing and opening browser agian it worked fine. :)
Andrew Winkler
37,739 PointsAndrew Winkler
37,739 PointsYou really need to copy and paste the whole question for forum partakers to help you. That entails copying and pasting the entire question.