The Bookworm's Haven Inventory System

Completed

Incomplete

Not Attended

Share

Bookworm's Haven, a cozy independent bookstore, has decided to upgrade its inventory management system. As their new database consultant, you've been tasked with setting up and managing the store's book database. The database contains information about each book, including its title, author, publication year, genre, price, and current stock. Your job is to help the store owner and staff with various queries and updates to optimize their inventory and sales strategies.

notAttendedQuestion - 1

The store owner wants to know the total value of their current inventory. Can you calculate the total value (price * stock) of all books in the store?

notAttendedQuestion - 2

The staff is preparing for a genre-focused promotion. They need a list of all unique genres in the database, along with the count of books in each genre. Can you provide this information?

notAttendedQuestion - 3

The store decides to apply a 10% discount to all books published before 1950. Can you update the prices and then display the titles, original prices, and new prices of the affected books?

notAttendedQuestion - 4

A customer is looking for books that are either in the 'Fiction' genre or priced under $12. Can you provide a list of books that meet either of these criteria, showing the title, author, genre, and price?

notAttendedQuestion - 5

The store owner wants to identify books that are potentially overstocked. Find books with more than 10 copies in stock and calculate how many days it would take to sell all copies if they sold one per day. Then, display the title, current stock, and days to sell all copies, sorted by the number of days in descending order ?

Prev
View Questions
Next
Code Editor
Table Name: books
idtitleauthorpublication_yeargenrepricestock
1To Kill a MockingbirdHarper Lee1960Fiction12.9910
21984George Orwell1949Science Ficton10.9915
3Pride and PrejudiceJane Austen1813Romance9.995
4The HobbitJ.R.R. Tolkien1937Fantasy14.9920
5The Catcher in the RyeJ.D.Salinger1951Fiction11.998

>>> Submit Your Query to validate