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

Karl Hogben
Karl Hogben
462 Points

> SELECT * FROM books WHERE genre = "Fantasy" ORDER BY genre ASC LIMIT 5

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

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,289 Points

Weird. I tried order by ID and it also passed the challenge. It's due to how the records are stored in the database. But the correct answer should order by first_published.