Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

📚 Book Store Sales Analysis | SQL

ChatGPT Image Jul 18, 2026, 02_34_58 PM

📌 Project Overview

This project analyzes a bookstore sales database using PostgreSQL to uncover valuable business insights related to book sales, customer purchasing behavior, inventory management, and revenue generation.

The analysis focuses on books, customers, and orders to identify top-selling books, customer spending patterns, genre-wise sales, inventory status, and overall business performance.

This project demonstrates practical SQL skills including joins, aggregation, filtering, grouping, sorting, subqueries, and business-oriented data analysis.


🛠 Tools & Technologies Used

  • PostgreSQL
  • SQL
  • CSV Dataset
  • Data Analysis
  • GitHub

🗂 Dataset Description

The project consists of three relational tables:

📖 Books

  • Book ID
  • Title
  • Author
  • Genre
  • Published Year
  • Price
  • Stock

👤 Customers

  • Customer ID
  • Name
  • Email
  • Phone
  • City
  • Country

🛒 Orders

  • Order ID
  • Customer ID
  • Book ID
  • Order Date
  • Quantity
  • Total Amount

These tables are connected using primary and foreign keys to perform relational SQL analysis.


❓ Key SQL Analysis Performed

Basic SQL Queries

  • Retrieved all books in the Fiction genre.
  • Listed books published after 1950.
  • Retrieved customers from Canada.
  • Displayed orders placed during November 2023.
  • Calculated total available book stock.
  • Identified the most expensive book.
  • Retrieved orders with quantity greater than one.
  • Found orders with total amount greater than $20.
  • Listed all available book genres.
  • Found the book with the lowest stock.
  • Calculated total revenue generated from all orders.

Advanced SQL Analysis

  • Calculated total books sold for each genre.
  • Computed average price of Fantasy books.
  • Identified customers who placed multiple orders.
  • Found the most frequently ordered book.
  • Retrieved the top three most expensive Fantasy books.
  • Calculated total books sold by each author.
  • Listed cities of customers spending more than $30.
  • Identified the customer with the highest total spending.
  • Calculated remaining stock after fulfilling all customer orders.

📊 Key Business Insights

Insight Description
Revenue Analysis Calculated total revenue generated from all customer orders.
Best Selling Books Identified the books ordered most frequently.
Customer Spending Found the customers contributing the highest revenue.
Genre Performance Compared total books sold across different genres.
Inventory Management Calculated remaining stock after sales.
Premium Books Identified the highest-priced books in the inventory.
Customer Activity Analyzed customers placing multiple orders.
Sales Distribution Examined city-wise customer purchasing activity.

📈 Business Insights

✦ Fiction and Fantasy books contribute significantly to overall sales.

✦ A small group of repeat customers generates a large portion of total revenue.

✦ Some books have very low remaining inventory, indicating the need for restocking.

✦ Genre-wise analysis helps identify customer preferences and popular categories.

✦ Revenue analysis highlights high-value transactions and purchasing trends.


🎯 Project Objectives

  • Practice SQL using a real-world relational database.
  • Analyze bookstore sales and customer behavior.
  • Perform joins across multiple tables.
  • Generate business insights using SQL queries.
  • Strengthen PostgreSQL querying skills.

📌 Conclusion

This project demonstrates how SQL can be used to analyze a relational bookstore database and generate meaningful business insights.

By exploring customer purchases, book inventory, genre performance, and revenue trends, the analysis showcases practical SQL techniques commonly used in real-world data analytics projects.

The project strengthens SQL fundamentals while demonstrating the ability to solve business problems using structured query language.


🤝 Connect

If you found this project useful or would like to collaborate, feel free to connect!

LinkedIn: https://www.linkedin.com/in/omkar-hole-c0der/

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors