SQL Data Analytics Project

This project demonstrates how SQL can be used beyond simple querying to perform structured business analysis directly inside the database. Built in SQL Server using the Gold layer dataset from the warehouse project, it focuses on analytical SQL techniques for reporting, trend analysis, ranking, segmentation, and reusable reporting views.

31694220 169b 4c28 ac95 9e827dfd9fc7

Exploratory Analysis

Database, dimensions, and date exploration

Advanced SQL Queries

Ranking, trends, cumulative analysis

Customer & Product Reports

Reusable SQL reporting views

Business Insights

Metrics, segmentation, and performance analysis

SQL Analysis Areas

Measures & KPI Exploration

Total sales, total quantity, average price, total orders, total customers, and product counts.

Ranking Analysis

Top-performing and lowest-performing products, highest-revenue customers, and lowest-order customers using ranking logic.

Change Over Time Analysis

Monthly sales trends, customer activity trends, and quantity trends using date-based SQL grouping.

Segmentation Analysis

Customer and product segmentation using CASE logic, spending behavior, lifespan, and cost ranges.

Sample Query Logic

Ranking Query

sql1

Ranks top products by total revenue using aggregate functions and window functions.

Customer Segmentation Query

sql2

Groups customers into VIP, Regular, and New segments based on spending and lifespan.

Product Reporting Query

sql3

Builds a reusable product report with recency, total sales, total orders, average selling price, and monthly revenue.

Reusable SQL Reports

The project includes report-focused SQL views that consolidate customer and product metrics into reusable outputs for business analysis.

Customer Report includes:

Product Report includes:

Key Outcomes & Deliverables

Analytical SQL Skills

Applied SQL for KPI calculation, ranking, trend analysis, and segmentation.

Business Reporting Logic

Built reusable queries and views for customer and product reporting.

Structured Query Design

Organized SQL work into clear analytical modules for exploration, reporting, and performance analysis.

Business Insight Generation

Turned warehouse data into usable reporting outputs and decision-support insights.

Explore the full SQL scripts and reporting logic in the GitHub repository.