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

What should be the code for this one? I have entered SELECT * FROM books ORDER BY first_published DSC;

But it is still giving me a syntax error.

1 Answer

Luke Maslany
Luke Maslany
3,533 Points

I’m assuming you’re looking at Task 2? If so, you almost had it. The keyword to sort descending is DESC.

Task 1: SELECT * FROM phone_book ORDER BY last_name, first_name

Task 2: SELECT * FROM books ORDER BY first_published DESC

Task 3: SELECT * FROM books ORDER BY genre, title

Tommy Gebru
Tommy Gebru
28,819 Points

Sure lets give all the answers :laughing: