Skip to content

vaixnv10/SQL-dataanalytics-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 SQL Data Analysis Project

📌 Project Overview

This project demonstrates SQL-based data analysis using an e-commerce sales dataset. The objective is to extract meaningful business insights by writing SQL queries to retrieve, filter, sort, group, and aggregate data.

The project was completed as part of the DecodeLabs Industrial Training Kit – Data Analytics Project 3, focusing on SQL fundamentals and data analysis.


🎯 Objectives

  • Create and manage a relational database using MySQL.

  • Import an e-commerce dataset into MySQL.

  • Analyze data using SQL queries.

  • Practice SQL concepts including:

    • SELECT
    • WHERE
    • ORDER BY
    • GROUP BY
    • HAVING
    • COUNT()
    • SUM()
    • AVG()
    • MAX()
    • MIN()
    • LIMIT
  • Generate business insights from transactional data.


🛠️ Tools & Technologies

  • MySQL Server
  • MySQL Workbench
  • Microsoft Excel
  • Visual Studio Code
  • Git
  • GitHub

📂 Dataset Information

The dataset contains 1,200 e-commerce order records.

Columns

  • OrderID
  • Date
  • CustomerID
  • Product
  • Quantity
  • UnitPrice
  • ShippingAddress
  • PaymentMethod
  • OrderStatus
  • TrackingNumber
  • ItemsInCart
  • CouponCode
  • ReferralSource
  • TotalPrice

📁 Project Structure

SQL-Data-Analysis-Project
│
├── dataset/
│   └── Orders.csv
│
├── sql/
│   ├── 01_Create_Database.sql
│   ├── 02_Create_Table.sql
│   ├── 03_Basic_Queries.sql
│   ├── 04_Filtering.sql
│   ├── 05_GroupBy.sql
│   ├── 06_Aggregations.sql
│   └── 07_Advanced.sql
│
├── screenshots/
│
└── README.md

🗄️ Database Creation

CREATE DATABASE DataAnalyticsProject;

USE DataAnalyticsProject;

📋 Table Creation

CREATE TABLE Orders(
    OrderID VARCHAR(20),
    Date DATE,
    CustomerID VARCHAR(20),
    Product VARCHAR(100),
    Quantity INT,
    UnitPrice DECIMAL(10,2),
    ShippingAddress VARCHAR(255),
    PaymentMethod VARCHAR(50),
    OrderStatus VARCHAR(50),
    TrackingNumber VARCHAR(50),
    ItemsInCart INT,
    CouponCode VARCHAR(50),
    ReferralSource VARCHAR(50),
    TotalPrice DECIMAL(10,2)
);

📈 SQL Operations Performed

Basic Queries

  • Display all records
  • Retrieve selected columns
  • Display unique products

Filtering

  • Filter orders using WHERE
  • Filter by payment method
  • Filter by order status

Sorting

  • Sort orders by total price
  • Sort orders by date

Aggregation

  • Count total orders
  • Calculate total sales
  • Calculate average order value
  • Find maximum order value
  • Find minimum order value

Grouping

  • Sales by product
  • Orders by payment method
  • Orders by referral source
  • Orders by order status

Advanced Queries

  • HAVING clause
  • Top 10 highest-value orders

📊 Business Insights

The SQL analysis helps answer questions such as:

  • How many total orders are in the dataset?
  • What is the total revenue?
  • What is the average order value?
  • Which products generate the highest sales?
  • Which payment methods are most frequently used?
  • Which referral sources bring the most customers?
  • Which orders have the highest value?

📸 Screenshots

The screenshots folder contains images of:

  • Database creation
  • Table creation
  • Dataset import
  • SQL query execution
  • Query results

These screenshots demonstrate the successful completion of each SQL task.


📚 SQL Concepts Covered

  • SELECT
  • DISTINCT
  • WHERE
  • ORDER BY
  • GROUP BY
  • HAVING
  • COUNT()
  • SUM()
  • AVG()
  • MAX()
  • MIN()
  • LIMIT

🎓 Learning Outcomes

Through this project, I learned how to:

  • Create and manage databases using MySQL.
  • Import CSV data into a relational database.
  • Write SQL queries for data analysis.
  • Apply filtering, sorting, grouping, and aggregation techniques.
  • Extract business insights from real-world data.
  • Organize a SQL project using Git and GitHub.

🚀 Future Enhancements

  • Visualize results using Power BI or Tableau.
  • Perform advanced SQL analysis with JOINs and Subqueries.
  • Automate data processing using Python.
  • Create SQL Views and Stored Procedures.

👤 Author

Vaishnav R L

SQL Data Analytics

This project is intended for educational and portfolio purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors