Learn SQL Step by Step

27 structured tutorials from fundamentals to advanced techniques. Follow the path to SQL mastery.

1

SQL Fundamentals

Learn the basics of SQL including SELECT statements, filtering with WHERE, and sorting results. Perf...

30 minBeginner
2

Advanced Sorting and Filtering

Learn to combine multiple conditions, use pattern matching, work with ranges, and handle NULL values...

35 minBeginner
3

SQL Aggregation Functions

Master data aggregation with SQL aggregate functions. Learn to count, sum, average, and group data f...

40 minBeginner
4

Handling NULL Values

Master NULL handling in SQL with IS NULL, COALESCE, and NULLIF functions.

25 minBeginner
5

Conditional Logic with CASE

Learn to use CASE statements for conditional logic in SQL queries.

30 minBeginner
6

Basic Data Manipulation (DML)

Master INSERT, UPDATE, and DELETE statements to modify database data.

25 minBeginner
7

SQL Arithmetic Operators

Learn to perform calculations in SQL using arithmetic operators: +, -, *, /, and %. Perfect for anal...

25 minBeginner
8

SQL Math Functions

Explore SQL math functions including ROUND, ABS, and MOD for precise calculations, data cleaning, an...

30 minBeginner
9

SQL DISTINCT

Master the DISTINCT keyword to eliminate duplicates and count unique values in SQL queries.

20 minBeginner
10

Integer Division & Decimals

Learn why SQL division truncates decimals and how to fix it using CAST and type conversion for accur...

25 minBeginner
11

SQL Inner Joins

Master INNER JOIN to combine related data from multiple tables.

45 minIntermediate
12

SQL Outer Joins

Learn LEFT JOIN and RIGHT JOIN to preserve data when relationships don't exist.

40 minIntermediate
13

SQL Self Joins

Learn to join a table to itself for comparisons and hierarchical queries.

35 minIntermediate
14

Combining Datasets with UNION

Master UNION and UNION ALL to combine result sets from multiple queries.

30 minIntermediate
15

Subqueries and Derived Tables

Learn to use subqueries in WHERE, FROM, and SELECT clauses for complex analysis.

50 minAdvanced
16

Working with Data Types & CASTing

Learn SQL data types and CAST function for type conversion.

35 minIntermediate
17

Date & Time Functions

Learn essential date and time functions for working with temporal data: date arithmetic, extraction,...

40 minIntermediate
18

SQL String Functions

Learn essential string functions for cleaning, formatting, and analyzing text data in SQL.

35 minIntermediate
19

Common Table Expressions (CTEs)

Master CTEs for readable, maintainable complex queries using WITH clause.

45 minAdvanced
20

SQL Window Functions

Learn ROW_NUMBER, RANK, LAG, LEAD, and aggregate window functions.

55 minAdvanced
21

Recursive Queries

Learn recursive CTEs for hierarchical data and complex graph traversal.

50 minAdvanced
22

LEAD & LAG Window Functions

Master LEAD and LAG window functions to analyze trends, calculate period-over-period changes, and pe...

35 minAdvanced
23

SQL Pivoting & Cross-Tabulation

Master SQL pivoting techniques to create pivot tables and transform long data into wide format for r...

40 minAdvanced
24

SQL Execution Order

Master SQL query execution order to write better queries, debug errors, and understand query optimiz...

30 minAdvanced
25

Advanced Aggregations

Master GROUPING SETS, ROLLUP, and CUBE for multi-dimensional analysis.

45 minAdvanced
26

DDL & Constraints

Master database schema design with CREATE TABLE, constraints, and ALTER statements.

50 minAdvanced
27

Transactions & Concurrency

Master database transactions and ACID properties for data integrity.

50 minAdvanced

Ready to Practice?

Jump into our interactive SQL editor with real datasets and start building queries.

Try SQLSandboxes Editor