Unpivot Columns to Rows in SQL Server (SQL Detailed Walkthrough)

Sdílet
Vložit
  • čas přidán 11. 09. 2024
  • In this video you will learn how to unpivot data using SQL Server via a highly detailed example. We will use Tableau Superstore data to build an aggregation table using a CTE (Common Table Expression).
    Aggregation tables are useful to data visualization developers as table information is stored with pre-summarized totals at a higher level of aggregation than the most granular fact table. They allow reports to be generated from small, rather than large, tables. The UNPIVOT relational operator enables this benefit!
    ★☆★ FOLLOW ME BELOW: ★☆★
    bit.ly/m/antho...
    Instagram / anthonysmoakdata
    LinkedIN / anthonysmoak
    Facebook / anthonybsmoak
    ☕☕ If my channel has helped you, consider buying me a coffee! Thanks & Cheers! ☕☕
    www.buymeacoff...
    ★☆★ Support this Channel: ★☆★
    Merch ► shop.spreadshirt.com/AnthonySmoak
    00 Intro
    0:30 Wide Data vs Tall Data
    1:45 Explore Dataset (Superstore)
    2:20 Build Aggregation Table
    3:22 Leave a Comment for More Explanation
    5:03 Learn to Comment Multiple Lines w/ a Shortcut
    6:12 Build a CTE
    7:27 UNPIVOT (finally)
    9:41 Column Consistency
    9:48 I'm Real
    10:39 Resolve Column Type Conflicts
    #sqlserver #analytics #data #dataanalyst #education #onlinelearning

Komentáře • 1

  • @florincopaci6821
    @florincopaci6821 Před 6 měsíci

    Hello
    can you please explain what s the trick here? In the datediff substracting 0 from orderdate?
    thank you