Beginner Level ▶
1. Introduction to SQL
2. Installation & Setup
3. SQL Basics
4. SELECT Queries
5. WHERE Clause
6. AND, OR, NOT
7. ORDER BY
8. LIMIT
9. DISTINCT
10. Basic Functions
11. Aggregate Functions
12. GROUP BY
13. HAVING
14. IN / BETWEEN / LIKE
15. Basic SQL Project
Intermediate Level ▶
16. Joins Overview
17. INNER JOIN
18. LEFT JOIN
19. RIGHT JOIN
20. FULL JOIN
21. CROSS JOIN
22. SELF JOIN
23. Subqueries
24. Views
25. UNION / UNION ALL
26. Indexes
27. Normalization
28. Constraints
29. Transactions
30. Intermediate SQL Project
Advanced Level ▶
Mini SQL Project
Congratulations 🎉 You have reached the final lesson of the Dataplexa SQL course.
This mini project combines Beginner, Intermediate, and Advanced SQL into a single real-world scenario.
This is how SQL is actually used in professional environments.
Project Scenario
You are working as a Data Analyst for a growing organization.
The company wants a unified reporting system to analyze employees, departments, performance, and structured data.
Database Schema
departments
+----+------------+ | id | name | +----+------------+ | 1 | IT | | 2 | HR | | 3 | Finance | +----+------------+
employees
+----+----------+---------------+--------+-------------------------------+
| id | name | department_id | salary | profile (JSON) |
+----+----------+---------------+--------+-------------------------------+
| 1 | Alice | 1 | 75000 | {"role":"Dev","city":"NY"} |
| 2 | Bob | 1 | 72000 | {"role":"Dev","city":"SF"} |
| 3 | Charlie | 2 | 60000 | {"role":"HR","city":"NY"} |
| 4 | Diana | 3 | 80000 | {"role":"Fin","city":"TX"} |
| 5 | Evan | NULL | 55000 | {"role":"Temp","city":"CA"} |
+----+----------+---------------+--------+-------------------------------+
Project Goals
- Combine employees with departments
- Handle missing relationships
- Rank salaries by department
- Query JSON data
- Create reusable views
- Optimize performance
Step 1: Employee & Department Report
SELECT e.name,
d.name AS department,
e.salary
FROM employees e
LEFT JOIN departments d
ON e.department_id = d.id;
LEFT JOIN ensures employees without departments are still included.
Step 2: Employees Without Departments
SELECT name FROM employees WHERE department_id IS NULL;
Step 3: Salary Ranking (Window Functions)
SELECT name,
department_id,
salary,
RANK() OVER (
PARTITION BY department_id
ORDER BY salary DESC
) AS salary_rank
FROM employees;
Step 4: Querying JSON Data
SELECT name,
profile->>'$.city' AS city
FROM employees
WHERE profile->>'$.city' = 'NY';
Step 5: Create a Reporting View
CREATE VIEW employee_full_report AS
SELECT e.name,
d.name AS department,
e.salary,
e.profile
FROM employees e
LEFT JOIN departments d
ON e.department_id = d.id;
Step 6: Performance Optimization
CREATE INDEX idx_emp_dept ON employees(department_id);
Concepts Used
- JOINs and NULL handling
- Window functions
- JSON querying
- Views
- Indexes
🎉 Congratulations!
You have successfully completed the Dataplexa SQL Course.
Click the button below to celebrate your achievement 🚀
What You Achieved
- Built real SQL projects
- Optimized queries and indexes
- Used advanced SQL features
- Completed an end-to-end SQL course
You are now ready for real-world SQL roles.