Course Content
Introduction to SQL
Introduction to SQL
Challenge: Avoid the Damaged Books
The library decided to mention the condition of the available books to better keep track of which books are suitable to be lent and which need to be preserved.
The condition of a book can be one of the following:
New | Used | Damaged
The books that are damaged cannot be borrowed by anyone. As a librarian, you are required to make a new list of all the available books that can be borrowed.
Swipe to show code editor
Write a query to list the names, authors, and publication years of all the books that are borrowable.
The books
table includes these columns: id
, title
, author
, book_condition
, genre
, and publication_year
.
Solution
Thanks for your feedback!
Challenge: Avoid the Damaged Books
The library decided to mention the condition of the available books to better keep track of which books are suitable to be lent and which need to be preserved.
The condition of a book can be one of the following:
New | Used | Damaged
The books that are damaged cannot be borrowed by anyone. As a librarian, you are required to make a new list of all the available books that can be borrowed.
Swipe to show code editor
Write a query to list the names, authors, and publication years of all the books that are borrowable.
The books
table includes these columns: id
, title
, author
, book_condition
, genre
, and publication_year
.
Solution
Thanks for your feedback!