SQL Data Analytics โข Lesson 20 โข Final Project
Real-World SQL Analytics Project
Put everything together. Explore a realistic business dataset, connect tables, aggregate cleanly, filter the noise, and build an analytical report using SQL.
0 of 8 concepts completed
Complete the activity and related MCQ to unlock the next concept.
Why Analysts Work in Projects
Real SQL work is not a single query. It is a workflow: understand the data, join related tables, aggregate by the right dimension, filter the noise, then turn numbers into a recommendation.
Interactive Data
Customers ยท Orders ยท Products
The three-table model used throughout this final project. Orders bridges Customers and Products.
Joined dataset
| order_id | date | customer | city | product | category | amount |
|---|---|---|---|---|---|---|
| 5001 | 2026-01-12 | Rahul | Delhi | Laptop | Electronics | โน50,000 |
| 5002 | 2026-01-18 | Priya | Mumbai | Office Chair | Furniture | โน8,000 |
| 5003 | 2026-02-05 | Rahul | Delhi | Keyboard | Electronics | โน2,500 |
| 5004 | 2026-02-11 | Amit | Pune | Desk | Furniture | โน15,000 |
| 5005 | 2026-02-20 | Neha | Delhi | Laptop | Electronics | โน50,000 |
| 5006 | 2026-03-03 | Priya | Mumbai | Keyboard | Electronics | โน2,500 |
| 5007 | 2026-03-10 | Kavya | Mumbai | Office Chair | Furniture | โน8,000 |
| 5008 | 2026-03-18 | Amit | Pune | Keyboard | Electronics | โน2,500 |
| 5009 | 2026-03-25 | Rahul | Delhi | Desk | Furniture | โน15,000 |
| 5010 | 2026-04-02 | Neha | Delhi | Keyboard | Electronics | โน2,500 |
Top Customer
Rahul
โน67,500
Top Product
Laptop
โน1,00,000
Top City
Delhi
โน1,20,000
Filter the joined dataset
Learn by Seeing
Four-stage workflow
Explore โ Join โ Analyze โ Report
Each stage uses a different set of skills from the whole course.
Click a stage to see what it involves:
Explore
Understand what tables exist, how they relate, and what questions they can answer.
Interactive Activity
What is the goal of a SQL analytics project?
Hint: It is not about the query, it is about the answer.
SQL Analyst Mindset
Real projects combine every skill
The final project is a JOIN + GROUP BY + CTE + window function, wrapped in a single query that answers a business question. That is what analytical SQL looks like in the real world.
Explore
Understand tables and keys.
Join
Bring related data together.
Analyze
Aggregate, rank and measure.
Report
Present a clear answer.
Frequently Asked Questions
Final Project โ FAQs
Start from the fact table (Orders) and JOIN the dimension tables (Customers, Products) onto it. The fact table drives the row count.
CTEs read top-to-bottom like a pipeline โ easier to debug and extend. Nested subqueries read inside-out and grow harder to follow.
Yes. Add another INNER JOIN to the chain โ as long as the new table has a foreign key connecting it to an existing one.
Restate the business question in plain words first, then check that each column in your SELECT directly supports that answer. If a column doesn't, drop it.
Lesson Summary
What you practiced
Customers โ Orders โ Products via foreign keys.
GROUP BY + SUM + ORDER BY for leaderboards.
Aggregate per entity, then rank the results.
SUM(x) OVER () for share of overall revenue.