Pivoting in SQL | Create a Summary Table with CASE and GROUP BY

Maven Analytics
8,052 views •

Check out the Advanced SQL Querying Course! https://bit.ly/4d8Nzx5 One way to create a summary table in SQL is by pivoting your data In this video, Lead Data Science Instructor Alice Zhao walks through how to pivot your data using a combination of CASE statements and GROUP BY. 🔗 Links to Resources: 👉 Advanced SQL Querying Course: https://bit.ly/4d8Nzx5 👉 MySQL Specialist Learning Path: https://bit.ly/3V6Y1it ⏱️ Timestamps: 00:00 - What is Pivoting in SQL 00:33 - The Pizza Table Example 01:22 - Creating 1s and 0s with CASE WHEN 02:45 - One Hot Encoding Explained 03:18 - Building the Summary Table with GROUP BY plus SUM 04:22 - Resources Maven Analytics is an award-winning learning platform where individuals and teams build new skills, showcase work, and connect with experts around the world. We've helped 2M+ people build job-ready data literacy & AI skills, master tools like Excel, SQL, Power BI, Tableau and Python, and build the foundation for successful careers. Start building life-changing skills for FREE 👉 https://bit.ly/4h7UqIH

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close