Created
August 11, 2019 13:03
-
-
Save bifacil/c0939c026261548ea46dc830f153c25e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
DimProduct.EnglishProductName AS EnglishProductName, | |
sum(sales.OrderQuantity) AS Unidades | |
FROM FactResellerSales sales | |
INNER JOIN DimProduct ON (sales.ProductKey=DimProduct.ProductKey) | |
INNER JOIN DimProductSubCategory ON (DimProduct.ProductSubcategoryKey=DimProductSubCategory.ProductSubcategoryKey) | |
INNER JOIN DimProductCategory ON (DimProductSubCategory.ProductCategoryKey=DimProductCategory.ProductCategoryKey) | |
INNER JOIN DimDate ON (sales.OrderDateKey=DimDate.DateKey) | |
INNER JOIN DimReseller ON (sales.ResellerKey=DimReseller.ResellerKey) | |
INNER JOIN DimGeography ON (DimReseller.GeographyKey=DimGeography.GeographyKey) | |
WHERE | |
DimGeography.SpanishCountryRegionName='Alemania' | |
AND DimProductCategory.SpanishProductCategoryName='Bicicleta' | |
AND DimDate.CalendarYear=2008 | |
GROUP BY DimProduct.EnglishProductName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment