Welcome to SQL Course Mastery
SQL is how data professionals talk to data. It's the language that helps you find answers, spot patterns, and turn raw tables into insights.
No matter what tool you use — Power BI, Tableau, or Python — it all starts here. SQL is the foundation that connects everything together.
Learning SQL isn't about writing commands — it's about seeing how data moves, connects, and tells a story.
I'm Baraa, your mentor on this journey. After 17+ years working on real data projects in enterprise, my goal is simple — to help you learn data the right way: visually, practically, and with real-world logic.
You'll learn what SQL is, why it matters, how it works behind the scenes, when to use it, and how it connects to real projects.
You're not just learning tools — you're learning how data professionals think.
Course & Project Materials
All files are completely free. No sign-up required.
- FREE Download All Files — All datasets, scripts, and resources for the course and all 3 projects.
Tools You'll Need
- SQL Server Express — for hosting your database
- SQL Server Management Studio (SSMS) — to run queries
Important Links
- GitHub — Course Repository — Access all lesson files on GitHub
- GitHub — SQL Data Warehouse Project — Full project files
- GitHub — SQL Data Analytics Project — Analytics project files
- Course Roadmap — The complete SQL course roadmap
- SQL Data Warehouse Notion Template — Step by step project template
All materials are provided for learning and personal use only. Commercial use, redistribution, or resale of these files is not permitted. If you share your work publicly, please credit "Data With Baraa."
Get Started
Before writing your first SQL query, you need to set up your environment. Here's what to install and how to get the course dataset loaded.
Step 1 — Install SQL Server Express
SQL Server Express is a free, lightweight version of Microsoft SQL Server. It's what we use throughout the entire course.
- Go to the SQL Server downloads page
- Download the Express edition (free)
- Run the installer and choose "Basic" installation
- Note the server name it gives you at the end — you'll need it
Step 2 — Install SSMS
SQL Server Management Studio is your query editor — the tool where you'll write and run all your SQL.
- Go to the SSMS download page
- Download and install SSMS
- Open SSMS, connect to your SQL Server using the server name from Step 1
Step 3 — Load the Course Dataset
Download the course materials and follow the setup instructions included in the README file.
Introduction to SQL
SQL stands for Structured Query Language. It's the standard language for working with relational databases.
A relational database stores data in tables — rows and columns, similar to a spreadsheet. SQL is how you talk to those tables: read data, filter it, combine it, calculate with it.
Why SQL?
- It's used everywhere — in data engineering, analytics, BI, and software development
- It's been around since the 1970s and isn't going anywhere
- It's readable and close to plain English —
SELECT name FROM users WHERE age > 25 - Every major data platform uses it: PostgreSQL, MySQL, SQL Server, BigQuery, Snowflake, Redshift
What can you do with SQL?
- Query — retrieve data from one or many tables
- Filter — narrow results to only what you need
- Aggregate — sum, count, average, group data
- Join — combine data from multiple tables
- Transform — clean and reshape data for analysis
- Create & modify — build tables, insert, update, delete data
SQL Syntax
Every SQL query follows the same basic structure. Understanding this structure makes every query readable — even complex ones.
Basic Query Structure
SELECT column1, column2
FROM table_name
WHERE condition
GROUP BY column1
HAVING aggregate_condition
ORDER BY column1 ASC
LIMIT 10;
Execution Order
SQL doesn't run top to bottom. The actual execution order is:
FROM— which table(s)WHERE— filter rowsGROUP BY— group rowsHAVING— filter groupsSELECT— choose columnsORDER BY— sort resultsLIMIT— cap the output
Understanding execution order helps you avoid common errors — like trying to use a SELECT alias inside a WHERE clause.
Case sensitivity
SQL keywords (SELECT, FROM, WHERE) are case-insensitive. But data values are case-sensitive. Convention is to write keywords in UPPERCASE for readability.
Semicolons
A semicolon ; ends a SQL statement. Required when running multiple statements together, optional for single queries depending on the tool.
SQL Data Warehouse Project
This is the most complete project in the course. You'll build a full data warehouse from scratch — the same way it's actually done in production.
What you'll build
- A Bronze / Silver / Gold medallion architecture
- ETL pipelines using stored procedures
- A complete dimensional data model with fact and dimension tables
- EDA and analytics queries on real business data
Project resources
- GitHub — SQL Data Warehouse Project
- Notion Project Template — step-by-step guide
Want progress tracking & a certificate?
The full SQL Mastery course includes structured progress tracking, quizzes, certificate of completion, and subtitles in 8 languages.
Enroll for $19.99
SQL Comments
Comments are ignored by the database engine — they're notes for the person reading the code. Use them to explain logic, disable parts of a query, or add context.
Single-line comment
Multi-line comment
When to comment
-- 90-day window = active customer threshold-- === Section 2: Revenue Calculations ===