This repository is a structured learning path that covers the main SQL concepts, organized into modules.
It is designed as my study guide created by me with the help of Chatgpt to make the exercises and evaluete my solutions. It contains explanations, examples, and exercises to build a strong foundation in SQL — from basics to advanced topics.
The database used in most of the exercises. Northwind database was chosen for this project.
Focus on defining and modifying database structures.
CREATE TABLE
,ALTER TABLE
,DROP TABLE
- Data types (numeric, text, date, binary).
Covers how to insert, update, and delete data.
INSERT
,UPDATE
,DELETE
- Practical exercises for data manipulation.
Learn how to query and retrieve data.
SELECT
,WHERE
,ORDER BY
,GROUP BY
,HAVING
.- Aggregation functions and filtering.
Work with transactions and ensure data consistency.
BEGIN TRANSACTION
,COMMIT
,ROLLBACK
.- ACID properties in SQL.
Explore temporary result sets that simplify queries.
- Recursive and non-recursive CTEs.
- Practical use cases for improving readability.
Learn how to nest queries inside others.
- Scalar, correlated, and multi-row subqueries.
- When to use subqueries vs. joins.
Advanced querying with ranking and analytical functions.
ROW_NUMBER
,RANK
,DENSE_RANK
.LAG
,LEAD
,NTILE
, and aggregates withOVER()
.
Introduction to stored procedures for reusability and modularization.
- Input and output parameters.
- Real examples with business logic.
Best practices for improving SQL performance.
- Indexes (clustered vs. non-clustered).
- Query tuning strategies.
- Build a solid SQL foundation.
- Practice with realistic queries and scenarios.
- Learn step by step from fundamentals to advanced topics.
- Share what I learned with the community.
Created by Gabriel Camba as part of a SQL learning journey for mastering database concepts and preparing for data engineering challenges.