Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 Sales Management System (SQL)

A complete SQL project developed using Microsoft SQL Server to manage customers, products, suppliers, employees, orders, and sales operations.

This project demonstrates intermediate SQL concepts through practical business scenarios including joins, aggregate functions, views, set operators, and sales reporting.


✨ Features

  • Manage Categories
  • Manage Suppliers
  • Manage Customers
  • Manage Employees
  • Manage Products
  • Manage Orders
  • Track Order Details
  • Generate Sales Reports
  • Create SQL Views
  • Perform Business Analysis Using SQL Queries

🗄️ Database Tables

Table Name Description
Categories Stores product categories.
Suppliers Stores supplier information.
Customers Stores customer details.
Employees Stores employee information.
Shippers Stores shipping company details.
Products Stores product information.
Orders Stores customer orders.
OrderDetails Stores ordered product details.

🧠 SQL Concepts Covered

  • SELECT
  • WHERE
  • DISTINCT
  • TOP
  • ORDER BY
  • LIKE
  • IN
  • NOT IN
  • BETWEEN
  • IS NULL
  • IS NOT NULL
  • INNER JOIN
  • LEFT JOIN
  • RIGHT JOIN
  • UNION
  • UNION ALL
  • INTERSECT
  • EXCEPT
  • CONCAT
  • UPPER
  • LOWER
  • LEN
  • TRIM
  • REPLACE
  • GETDATE()
  • YEAR()
  • MONTH()
  • DAY()
  • DATEADD()
  • DATEDIFF()
  • ISNULL()
  • COALESCE()
  • CASE
  • COUNT()
  • SUM()
  • AVG()
  • MIN()
  • MAX()
  • GROUP BY
  • HAVING
  • Views

📁 Project Structure

Sales-Management-System-SQL
│
├── Database
├── SQL Scripts
│   ├── 01_Create_Database.sql
│   ├── 02_Create_Tables.sql
│   ├── 03_Insert_Data.sql
│   ├── 04_Basic_SELECT.sql
│   ├── 05_JOINS.sql
│   ├── 06_SET_OPERATORS.sql
│   ├── 07_FUNCTIONS.sql
│   ├── 08_GROUPBY_HAVING.sql
│   ├── 09_VIEWS.sql
│   └── 10_Final_Business_Queries.sql
│
├── Documentation
├── README Images
├── README.md
└── LICENSE

📸 Project Screenshots

🗄️ Database Overview

Database Overview


🔍 Basic Queries

Filtering Query

LIKE Query


🔗 Joins

Customer Orders

Product Category

Complete Order Report


🔄 Set Operators

UNION

INTERSECT


⚙️ Functions

CONCAT

Date Functions

CASE

ISNULL & COALESCE


📊 Group by & Having

Total Stock

HAVING

Category Summary


👁️ Views

Product Details View

Order Details View


📈 Final Business Queries

Best Selling Products

High Value Customers

Revenue Report


🎯 Project Highlights

  • Designed a normalized relational database with 8 interconnected tables.
  • Implemented Primary Key and Foreign Key relationships to maintain data integrity.
  • Developed 50+ business-oriented SQL queries for real-world sales reporting.
  • Performed customer, product, supplier, and order analysis using SQL.
  • Created reusable SQL Views to simplify reporting queries.
  • Applied aggregate functions, joins, set operators, CASE expressions, and filtering techniques.
  • Organized the project with professional documentation, screenshots, and GitHub-ready structure.

🛠️ Technologies Used

  • Microsoft SQL Server
  • SQL Server Management Studio (SSMS)
  • Visual Studio Code
  • Markdown
  • Git & GitHub

🚀 How to Run

  1. Clone this repository.

  2. Open SQL Server Management Studio (SSMS).

  3. Execute the SQL scripts in the following order:

    • 01_Create_Database.sql
    • 02_Create_Tables.sql
    • 03_Insert_Data.sql
    • 04_Basic_SELECT.sql
    • 05_JOINS.sql
    • 06_SET_OPERATORS.sql
    • 07_FUNCTIONS.sql
    • 08_GROUPBY_HAVING.sql
    • 09_VIEWS.sql
    • 10_Final_Business_Queries.sql
  4. Explore the generated views and business reports.


📈 Future Improvements

  • Stored Procedures
  • Triggers
  • Common Table Expressions (CTEs)
  • Window Functions
  • Indexes
  • Transactions
  • Performance Optimization

👨‍💻 Author

Pushkar Negi

Aspiring Data Engineer | SQL Enthusiast

If you found this project helpful, please consider giving it a ⭐ on GitHub.

About

A complete SQL Server Sales Management System project demonstrating intermediate SQL concepts with real-world business scenarios.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages