Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Help a Reader Find Their Favorite Genre | Filtering Data
Introduction to SQL

Swipe to show menu

book
Challenge: Help a Reader Find Their Favorite Genre

You are doing your job as a librarian when a reader approaches you saying they're in the mood for books from the Fantasy genre. They ask you to quickly find all the books in that category.

Task

Swipe to start coding

Write an SQL query using the WHERE clause to find the titles of all the books where the genre is "Fantasy".

The books table includes the columns: id, title, author, genre, publication_year, and price.

Note

Strings in SQL are case-sensitive. Therefore 'fantasy' is not the same as 'Fantasy'.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 2
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 1.72

book
Challenge: Help a Reader Find Their Favorite Genre

You are doing your job as a librarian when a reader approaches you saying they're in the mood for books from the Fantasy genre. They ask you to quickly find all the books in that category.

Task

Swipe to start coding

Write an SQL query using the WHERE clause to find the titles of all the books where the genre is "Fantasy".

The books table includes the columns: id, title, author, genre, publication_year, and price.

Note

Strings in SQL are case-sensitive. Therefore 'fantasy' is not the same as 'Fantasy'.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

close

Awesome!

Completion rate improved to 1.72

Swipe to show menu

some-alt