Challenge: Multiple Conditions
In the book sale, an academic researcher needs books on History
that were published between 1990 and 2010, but only if they are priced at $30 or less. Compile a list that meets all these criteria.
Swipe to start coding
Write an SQL query to fetch the titles
of all books where:
- The genre is "
Historical
"; - The
publication_year
is greater than or equal to 1990 and less than or equal to 2010; - The
price
is less than or equal to 30;
The book_store
table includes these columns: id
, title
, author
, genre
, publication_year
, and price
.
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 1.72
Challenge: Multiple Conditions
Swipe to show menu
In the book sale, an academic researcher needs books on History
that were published between 1990 and 2010, but only if they are priced at $30 or less. Compile a list that meets all these criteria.
Swipe to start coding
Write an SQL query to fetch the titles
of all books where:
- The genre is "
Historical
"; - The
publication_year
is greater than or equal to 1990 and less than or equal to 2010; - The
price
is less than or equal to 30;
The book_store
table includes these columns: id
, title
, author
, genre
, publication_year
, and price
.
Solution
Thanks for your feedback!
Awesome!
Completion rate improved to 1.72single