Sign-up now and get instant access
Leave a comment
Customized training to master new skills and grow your business.
Beginner to advanced classes taught by Microsoft MVPs and Authors.
In-depth boot camps take you from a novice to mastery in less than a week.
Season Learning Pass
Get access to our very best training offerings for successful up-skilling.
Stream Pro Plus
Combine On-Demand Learning platform with face-to-face Virtual Mentoring.
Quick references for when you need a little guidance.
Summaries developed in conjunction with our Learn with the Nerds sessions.
Digital goodies - code samples, student files, and other must have files.
Stay up-to-date on all things Power BI, Power Apps, Microsoft 365 and Azure.
Community Discord Server
Start here for technology questions to get answers from the community.
Earn money by driving sales through the Pragmatic Works' Training Affiliate Program.
It's time to address your client's training needs.
Learn how to get into IT with free training and mentorship.
Discover the faces behind our success: Meet our dedicated team
How can we help? Connect with Our Team Today!
Find all the information you’re looking for. We’re happy to help.
Austin Libal, a Data Engineer Trainer trainer at Pragmatic Works, takes viewers through the process of unpivoting data using SQL. Unpivoting is a handy technique to transform data from a denormalized state to its normal form, facilitating easier analysis and a fresh perspective on the information.
To start, Austin highlights the scenario where one might receive data in a denormalized form, perhaps from an Excel report, and the need to unpivot it for better analysis.
1. Defining Columns for Unpivoting: Austin selects the relevant columns for unpivoting: movie ID, title, year, and sales amount.
2. Subquery for Source Data: A subquery is used to fetch the necessary columns from the movie sales data, creating a source for the unpivot operation.
3. Executing the Unpivot: The unpivot operation is initiated with the command, transforming columns into rows. Austin explains the syntax, including the unpivot keyword, the new column (sales amount), and the values to unpivot (sales amounts for different years).
4. Ordering the Results: An order by clause is added to arrange the results by movie ID and sales year.
5. Executing the Unpivot: Austin executes the code, successfully transforming the denormalized data into a normalized form.
In this insightful tutorial, Austin Libal demystifies the process of unpivoting data with SQL, making it accessible for both beginners and experienced users. The step-by-step demonstration, coupled with an alternative approach, provides a comprehensive understanding of how to tackle denormalized datasets and unlock their full analytical potential. As Austin wraps up, viewers are left with a newfound appreciation for the power of SQL in shaping and optimizing data for meaningful insights.
Viewers that enjoyed this video and want to learn more about Azure SQL we invite to subscribe to the Pragmatic Works YouTube channel. We also invite our viewers to sign up for the Pragmatic Works' on-demand learning platform, where we offer a wide range of Microsoft courses across many Microsoft applications.
ABOUT THE AUTHOR
Austin is a Jacksonville native who graduated from The Baptist College of Florida in 2012. He previously worked as a manager in the retail service industry. He enjoys spending time with his wife and two kids. His primary focus at Pragmatic Works is on Azure Synapse Analytics and teaching the best practices for data integration, enterprise data warehousing, and big data analytics. He also enjoys helping customers learn the ins and outs of Power BI and showing people new ways to grow their business with the Power Platform.
Join other Azure, Power Platform and SQL Server pros by subscribing to our blog.