Returns a list of Department IDs along with the sum of their sales for the date of January 1, 2000.
In the following example one can ask "How many units were sold in each region for every ship date?":
The following code returns the data of the above pivot table which answers the question "How many units were sold in each region for every ship date?":
Common grouping (aggregation) functions include:
"SQL GROUP BY Statement". www.w3schools.com. Retrieved 2020-09-18. https://www.w3schools.com/sql/sql_groupby.asp ↩
shkale-msft. "GROUP BY (Transact-SQL) - SQL Server". docs.microsoft.com. Retrieved 2020-09-18. https://docs.microsoft.com/en-us/sql/t-sql/queries/select-group-by-transact-sql ↩
"SQL Grouping and Aggregation". databaselecture.com. Retrieved 2020-12-09. http://www.databaselecture.com/sql.html ↩