Explanation/Reference:
Explanation:
With dimensionally modeled star schemas or snowflake schemas, decision support queries follow a typical pattern: the query selects several measures of interest from the fact table, joins the fact rows with one or several dimensions along the surrogate keys, places filter predicates on the business columns of the dimension tables, groups by one or several business columns, and aggregates the measures retrieved from the fact table over a period of time.
The following demonstrates this pattern, which is also sometimes referred to as a star join query:
select ProductAlternateKey,

CalendarYear,sum(SalesAmount)

from FactInternetSales Fact

join DimTime

on Fact.OrderDateKey = TimeKey

join DimProduct

on DimProduct.ProductKey

Fact.ProductKey

where CalendarYear between 2003 and 2004

and ProductAlternateKey like 'BK%'

group by ProductAlternateKey,CalendarYear
