0% found this document useful (0 votes)
19 views4 pages

SQL Queries for Online Bookstore Analysis

The document outlines a project for an online bookstore that includes three CSV files: Books, Customers, and Orders, which must share a common column. It lists basic SQL queries to retrieve specific data such as books in a genre, customer details, and order statistics, as well as advanced queries for deeper insights like total books sold per genre and customer spending. The project aims to analyze and manage book inventory, customer information, and sales effectively.

Uploaded by

karanmundhava41
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views4 pages

SQL Queries for Online Bookstore Analysis

The document outlines a project for an online bookstore that includes three CSV files: Books, Customers, and Orders, which must share a common column. It lists basic SQL queries to retrieve specific data such as books in a genre, customer details, and order statistics, as well as advanced queries for deeper insights like total books sold per genre and customer spending. The project aims to analyze and manage book inventory, customer information, and sales effectively.

Uploaded by

karanmundhava41
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQL

Project on
Online Book store
3 CSV Files
Tables must have at least one common column with same column name and same data type

Book_ID Customer_ID Book_ID Customer_ID

[Link] [Link] [Link]


Basic Queries
1) Retrieve all books in the "Fiction" genre
2) Find books published after the year 1950
3) List all customers from the Canada
4) Show orders placed in November 2023
5) Retrieve the total stock of books available
6) Find the details of the most expensive book
7) Show all customers who ordered more than 1 quantity of a book
8) Retrieve all orders where the total amount exceeds $20
9) List all genres available in the Books table
10) Find the book with the lowest stock
11) Calculate the total revenue generated from all orders
Advance Queries
1) Retrieve the total number of books sold for each genre
2) Find the average price of books in the "Fantasy" genre
3) List customers who have placed at least 2 orders
4) Find the most frequently ordered book
5) Show the top 3 most expensive books of 'Fantasy' Genre
6) Retrieve the total quantity of books sold by each author
7) List the cities where customers who spent over $30 are located
8) Find the customer who spent the most on orders
9) Calculate the stock remaining after fulfilling all orders

You might also like