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

Shain Jones
Shain Jones
1,230 Points

Unsure how to fix the code as the ORDERED BY is there. How can I fix this? Thanks in advance.

Looking at the code I am unsure where to correct.

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,287 Points

I'll assume you are on the first task since both tasks are very similar. Did you use ORDERED BY as stated in your title instead of ORDER BY? That would be incorrect. The correct code is as follows:

SELECT * FROM books WHERE genre = "Fantasy" ORDER BY first_published LIMIT 5;