Skip to content

Instantly share code, notes, and snippets.

@bifacil
Created August 11, 2019 13:05
Show Gist options
  • Save bifacil/ecd0a8b7692d0118e46fe742364eb3a5 to your computer and use it in GitHub Desktop.
Save bifacil/ecd0a8b7692d0118e46fe742364eb3a5 to your computer and use it in GitHub Desktop.
--Ejemplo 4
SELECT
DimProduct.EnglishProductName AS EnglishProductName,
sum(sales.OrderQuantity) WHERE (DimDate.CalendarYear=2008) [Ventas 2008],
sum(sales.OrderQuantity) WHERE (DimDate.CalendarYear=2007) [Ventas 2007],
[Ventas 2008]-[Ventas 2007] Diferencia
FROM DATABASE 'http://bit.ly/2oP72d6'
WHERE
DimProductCategory.SpanishProductCategoryName='Bicicleta'
AND DimDate.SpanishMonthName='Enero'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment