
This course will teach the basics of Microsoft's dialect of the standard SQL language: Transact-SQL. Topics include both querying and modifying data in relational databases that are hosted in Microsoft SQL Server-based database systems, including: Microsoft SQL Server, Azure SQL Database, Azure Synapse Analytics, and Microsoft Fabric.
This course can be valuable for anyone who needs to write basic SQL or Transact-SQL queries. This includes anyone working with data as a data analyst, a data engineer, a data scientist, a database administrator or a database developer. It can also be useful for others peripherally involved with data, or wanting to learn more about working with data such as solution architects, students and technology managers.
By the end of the course, participants should be able to:
- Query Data: You will be able to write SELECT statements to retrieve specific information from a database.
- Organize Results: You'll learn how to sort, filter, and page through data so you only see the exact records you need.
- Connect Tables: You will master JOIN operations to combine data from different tables into a single view.
- Perform Calculations: You'll learn to use built-in functions to summarize data and group results (like finding totals or averages).
- Advanced Logic: You'll be able to write subqueries to create more complex, "nested" data requests.
- Manage Records: You will gain the skills to safely insert, update, and delete information within a database.
Module 01: Introduction to Transact-SQL
This module provides an introduction to relational databases, the SQL language and Transact-SQL. You'll learn what kinds of statements make up the SQL language and look at the SELECT statement in detail.
Topics
- Introduction
- Work with schemas
- Explore the structure of SQL statements
- Examine the SELECT statement
- Work with data types
- Handle NULLs
- Exercise - Work with SELECT statements
Module 02: Sort and filter results in T-SQL
Learn how to sort and filter query results
Topics
- Introduction
- Sort your results
- Limit the sorted results
- Page results
- Remove duplicates
- Filter data with predicates
- Exercise - Sort and filter query results
Module 03: Combine multiple tables with JOINs in T-SQL
Explore T-SQL queries accessing data from multiple tables with various kinds of JOIN operations.
Topics
- Introduction
- Understand joins concepts and syntax
- Use inner joins
- Use outer joins
- Use cross joins
- Use self joins
- Exercise - Query multiple tables with joins
Module 04: Write Subqueries in T-SQL
Learn how to use subqueries to combine multiple SELECT statements and compose nested queries.
Topics
- Introduction
- Understand subqueries
- Use scalar or multi-valued subqueries
- Use self-contained or correlated subqueries
- Exercise - Use subqueries
Module 05: Use built-in functions and GROUP BY in Transact-SQL
Learn how to use functions in Transact-SQL, and how to group aggregated results.
Topics
- Introduction
- Categorize built-in functions
- Use scalar functions
- Use ranking and rowset functions
- Use aggregate functions
- Summarize data with GROUP BY
- Filter groups with HAVING
- Exercise - Use built-in functions
Module 06: Modify data with T-SQL
Learn how to use Transact-SQL to insert, update, and delete data in a database.
Topics
- Introduction
- Insert data
- Generate automatic values
- Update data
- Delete data
- Merge data based on multiple tables
- Exercise - Modify data









