60 likes | 264 Views
Systematic MDX to SQL Translation: Ex. P. 13 Dimension Restriction Selections Salesperson Name Venkatrao Name or Netz Time Year.Qtr1.Children Year 1998 or Year.Qtr2 Quarter or Year.Qtr3 Month or Year.Qtr4.Children Measures MeasType Sales MeasType. Product
E N D
Systematic MDX to SQL Translation: Ex. P. 13 Dimension Restriction Selections Salesperson Name Venkatrao Name or Netz Time Year.Qtr1.Children Year 1998 or Year.Qtr2 Quarter or Year.Qtr3 Month or Year.Qtr4.Children Measures MeasType Sales MeasType Prof. Bayer, DWH-MDX-SQL, SS 2000
Product Category Group Item Geogr-Region Continent Subcontinent Nation State America.USA-North.Children or America.USA-South or Asia.East-Asia.Japan Prof. Bayer, DWH-MDX-SQL, SS 2000
SQL Syntax: Ex. P. 13 for completely aggregated Cube Dimension SQL Salesperson Name select Name from ... where Name = ‚Venkatrao‘ or Name = ‚Netz‘ Time select Year, Quarter, Month from ... Year where Year = 1998 and Quarter [Quarter = ‚Qtr1‘ or Quarter = ‚Qtr4‘ or Month (Quarter = ‚Qtr2‘ and Month = ‚ALL‘) or (Quarter = ‚Qtr3‘ and Month = ‚ALL‘)] Measures MeasType select MeasType from ... where MeasType = ‚Sales‘ Prof. Bayer, DWH-MDX-SQL, SS 2000
Product Category Group Item Geogr-Region Continent Subcontinent Nation State select Continent, Subcontinent, Nation from ... where [Continent = ‚America‘ and (Subcontinent = ‚USA-North‘ or (Subcontinent = ‚USA-South‘ and Nation = ‚ALL‘))]or [Continent = ‚Asia‘ and Subcontinent = ‚East-Asia‘ and Nation = ‚Japan‘ ] Prof. Bayer, DWH-MDX-SQL, SS 2000
select Name, Year, Quarter, Month, Continent, Subcontinent, Nation, MeasType from ... where Name = ‚Venkatrao‘ or Name = ‚Netz‘ and Year = 1998 and [Quarter = ‚Qtr1‘ or Quarter = ‚Qtr4‘ or (Quarter = ‚Qtr2‘ and Month = ‚ALL‘) or (Quarter = ‚Qtr3‘ and Month = ‚ALL‘)] and MeasType = ‚Sales‘ and [Continent = ‚America‘ and (Subcontinent = ‚USA-North‘ or (Subcontinent = ‚USA-South‘ and Nation = ‚ALL‘))] or[Continent = ‚Asia‘ and Subcontinent = ‚East-Asia‘ and Nation = ‚Japan‘ ] Prof. Bayer, DWH-MDX-SQL, SS 2000
SalesVenkatrao Netz ALL • Qtr1 ALL 14 15 • Jan 7 3 10 • Feb 3 5 8 • March 4 7 11 • Qtr2 ALL 7 • April 3 ... • May 2 • June 2 • Qtr3 ALL 2 • July 1 • August 0 • Sept 1 • Qtr4 ALL 17 • Oct 5 • Nov 2 • Dec 10 Prof. Bayer, DWH-MDX-SQL, SS 2000