Database Reference
In-Depth Information
SELECT [EnglishProductCategoryName]
, [EnglishMonthName]
, SUM([TotalProductCost]) AS TotalCost
, SUM([SalesAmount]) AS TotalSales
FROM dbo.HDFS_FactInternetSales FIS
JOIN dbo.DimCustomer DC
ON FIS.CustomerKey = DC.CustomerKey
JOIN dbo.DimDate DD
ON FIS.[OrderDateKey] = DD.[DateKey]
JOIN dbo.DimProduct DP
ON FIS.[ProductKey] = DP.[ProductKey]
JOIN dbo.DimProductSubcategory DPS
ON DP.[ProductSubcategoryKey] =
DPS.[ProductSubcategoryKey]
JOIN [dbo].[DimProductCategory] DPC
ON DPS.[ProductCategoryKey] =
DPC.[ProductCategoryKey]
GROUP BY [EnglishProductCategoryName]
, [EnglishMonthName]
ORDER BY [TotalSales] DESC
, [EnglishProductCategoryName]
OPTION
( HASH JOIN
, LABEL = 'Polybase Read : Q002 :
HDFS_FactInternetSales'
)
;
Search WWH ::




Custom Search