Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.21 KB

File metadata and controls

32 lines (24 loc) · 1.21 KB

E-Commerce Sales Database

A beginner SQL project simulating an online store's database to manage customers, products, orders, and analyze sales data.

Overview

This project creates a relational database for an e-commerce platform, tracking customer purchases and providing insights like total revenue, top products, and customer spending habits.

Tech Used

  • SQL (Tested with SQLite, compatible with MySQL/PostgreSQL)

Setup Instructions

  1. Create the Database: Run schema.sql to create the tables.
  2. Populate Data: Run data.sql to insert sample data (10 customers, 10 products, 15 orders).
  3. Run Queries: Explore queries.sql for analysis examples.

Sample Insights

  • Total Revenue (Jan-Feb 2025): $5839.80
  • Top Product: "Laptop" (3 units sold)
  • Top Customer: Henry Moore ($1599.98 spent)
  • Best Category: Electronics ($4799.88 revenue)

Files

  • schema.sql: Table creation scripts.
  • data.sql: Sample data for testing.
  • queries.sql: Queries for sales analysis.

Skills Demonstrated

  • Table design with primary/foreign keys
  • JOINs, aggregation (SUM, COUNT), and grouping
  • Filtering and sorting data

Feel free to fork this repo and expand it with more data or queries!