Transform data by implementing pivot, unpivot, rollup, and cube

Advanced
Data Analyst
Data Engineer
Data Scientist
Database Administrator
Developer
Solution Architect
Student
Azure SQL Database
Azure SQL Managed Instance
SQL Server on Azure Virtual Machines
Azure SQL Server on Virtual Machines
SQL Server

Learn how to transform data using Transact-SQL.

Learning objectives

After completing this module, you'll be able to:

  • Write queries that pivot and unpivot result sets.

  • Write queries that specify multiple groups with GROUPING SET, CUBE, and ROLLUP.

Prerequisites

Before starting this module, you should have experience of using Transact-SQL queries to retrieve and filter data from a table in a database.