You are on page 1of 1

SELECT DimCustomer.FirstName, DimGeography.

StateProvinceName, COUNT(*) AS Ex
pr1
FROM DimCustomer INNER JOIN
DimGeography ON DimCustomer.GeographyKey = DimGeography.Ge
ographyKey INNER JOIN
FactInternetSales ON DimCustomer.CustomerKey = FactInterne
tSales.CustomerKey
GROUP BY DimCustomer.FirstName, DimGeography.StateProvinceName order by DimCusto
mer.FirstName asc
SELECT DimCustomer.FirstName, DimProduct.EnglishProductName, sum(FactInternetSa
les.OrderQuantity)
FROM DimCustomer INNER JOIN
FactInternetSales ON DimCustomer.CustomerKey = FactInterne
tSales.CustomerKey INNER JOIN
DimProduct ON FactInternetSales.ProductKey = DimProduct.Pr
oductKey
group by DimCustomer.FirstName, DimProduct.EnglishProductName
order by DimCustomer.FirstName asc;

You might also like