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.

Tools You'll Need

Important Links

Usage Notice

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.

  1. Go to the SQL Server downloads page
  2. Download the Express edition (free)
  3. Run the installer and choose "Basic" installation
  4. 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.

  1. Go to the SSMS download page
  2. Download and install SSMS
  3. 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:

  1. FROM — which table(s)
  2. WHERE — filter rows
  3. GROUP BY — group rows
  4. HAVING — filter groups
  5. SELECT — choose columns
  6. ORDER BY — sort results
  7. LIMIT — 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 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

-- This is a single-line comment
SELECT name FROM customers; -- inline comment too

Multi-line comment

/*
  This is a multi-line comment.
  Use this for longer explanations
  or to temporarily disable a block of code.
*/
SELECT name, email FROM customers;

When to comment

  • Explain complex joins or subqueries
  • Document business logic: -- 90-day window = active customer threshold
  • Temporarily exclude a filter while testing
  • Mark sections in long scripts: -- === Section 2: Revenue Calculations ===

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

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