SQL— Structured Query Language
The language behind data storage, querying, and analysis.

SQL Tutorial: Complete Topics List from Beginner to Advanced
This page brings together SQL topics for beginners to advanced learners in one organized place. Whether you’re just starting out or brushing up on advanced concepts, you’ll find topics grouped into three levels below. First, beginners can start with fundamentals like tables, keys, and basic queries. As you progress, intermediate topics cover joins, subqueries, and CTEs in more depth. Finally, advanced learners can explore window functions, performance tuning, and real-world data engineering scenarios. Simply click a tab below to jump straight to the topics that match your level.
SQL Fundamentals
- What is SQL?
- Why SQL is used
- SQL vs Database
- SQL vs DBMS
- Relational Database Concepts
- Tables, Rows and Columns
- Primary Key
- Foreign Key
- Relationships
- SQL Syntax and Rules
Database Objects
SQL Command Categories
Basic Queries
Operators
- Arithmetic Operators
- Comparison Operators
- Logical Operators
- BETWEEN
- IN
- NOT IN
- LIKE
- NOT LIKE
- IS NULL
- IS NOT NULL
Data Modification
Basic Functions
Beginner Aggregation
Joins
- What is a JOIN?
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- FULL OUTER JOIN
- CROSS JOIN
- SELF JOIN
- Multiple Table Joins
- JOIN with Conditions
Subqueries
- What is a Subquery?
- Single-Row Subquery
- Multi-Row Subquery
- Correlated Subquery
- Subquery in WHERE
- Subquery in FROM
- Subquery in SELECT
EXISTS
Set Operators
Conditional Logic
Common Table Expressions
Intermediate Functions
Window Functions
- What are Window Functions?
- OVER()
- PARTITION BY
- ORDER BY inside Window Functions
- ROW_NUMBER()
- RANK()
- DENSE_RANK()
- NTILE()
- LAG()
- LEAD()
- FIRST_VALUE()
- LAST_VALUE()
Advanced Windowing
- Running Total
- Moving Average
- Cumulative Calculations
- Ranking within Groups
- Top N per Group
- Comparing Current vs Previous Row
- Finding First/Last Records
Advanced Aggregation
PIVOT & UNPIVOT
Advanced Query Techniques
- Nested Queries
- Multiple-Level Subqueries
- Correlated Queries
- Complex JOIN Problems
- Anti JOIN
- Semi JOIN
- Conditional Aggregation
- Dynamic SQL
Advanced Database Concepts — Views
Transactions
Stored Procedures
User-Defined Functions
SQL Data Analysis
- Finding Duplicate Records
- Removing Duplicates
- Finding Missing Data
- Handling NULL Values
- Finding Second Highest Salary
- Finding Nth Highest Salary
- Top N Records
- Employees Above Average Salary
- Department-Wise Maximum Salary
- Department-Wise Average Salary
- Customers Without Orders
- Products Never Sold
- First and Last Purchase
- Monthly Sales Analysis
- Year-over-Year Analysis
- Month-over-Month Analysis
- Running Sales Total
- Customer Retention Analysis
- Revenue Analysis
- Ranking Customers
- Identifying Repeat Customers
SQL Data Cleaning
- Removing Extra Spaces
- Changing Case
- Splitting Strings
- Combining Strings
- Handling NULLs
- Removing Duplicate Data
- Standardizing Values
- Converting Data Types
- Handling Invalid Dates
- Identifying Missing Records
- Data Validation Queries
SQL + JSON / Semi-Structured Data
- What is JSON?
- JSON Structure
- JSON Objects
- JSON Arrays
- Querying JSON Data
- Extracting JSON Values
- Flattening JSON
- Working with Nested JSON
- JSON Aggregation
SQL Performance & Optimization
- How SQL Queries Execute
- Query Execution Plan
- Understanding Query Performance
- Avoiding Unnecessary SELECT *
- Efficient JOINs
- Filtering Efficiently
- Subquery Optimization
- CTE vs Subquery
- Index Concepts
- Clustered vs Non-Clustered Index
- Query Optimization Techniques
