Presentation is loading. Please wait.

Presentation is loading. Please wait.

MDX in SQL Server 2008 Szymon Wilk (na podstawie materiałów przygotowanych przez Krzysztofa Dembczyńskiego) TWO, 2009/10.

Similar presentations


Presentation on theme: "MDX in SQL Server 2008 Szymon Wilk (na podstawie materiałów przygotowanych przez Krzysztofa Dembczyńskiego) TWO, 2009/10."— Presentation transcript:

1 MDX in SQL Server 2008 Szymon Wilk (na podstawie materiałów przygotowanych przez Krzysztofa Dembczyńskiego) TWO, 2009/10

2 Preparation 1. Download the data cube (project from the last tutorial) https://ophelia.cs.put.poznan.pl/webdav/dm/students/ winter_2009/ 2. Introduce necessary changes to the project configuration 3. Deploy the data cube 4. Connect to the data cube (Analysis Services) 5. Create and execute specific MDX queries

3 Changing the Project Configuration Change the connection string Verify the impersonation settings

4 Changing the Project Configuration Change the project properties (  deployment settings)

5 Connecting to the Data Cube Connect to Analysis Services (not Database Engine)

6 Connecting to the Data Cube Navigate to the deployed data cube (OLAP Tutorial  Analysis Services Tutorial) and open a new query window

7 Query 1 Show the sales amount in March 2002 and April 2002 (Due Date dimension; rows) grouped by gender (columns)

8 Query 1 – Solution

9 Query 2 Show the sales amount between February and November 2002 (rows) grouped by gender (columns)

10 Query 2 – Solution

11 Query 3 Show the sales amount for all months (rows) grouped by gender (columns)

12 Query 3 – Solution

13 Query 4 Show the sales amount for all 2002 quarters (rows) grouped by gender (columns)

14 Query 4 – Solution

15 Query 5 Show the sales amount for all years and product lines (rows) grouped by gender (columns)

16 Query 5 – Solution

17 Query 6 Show the sales amount (total over all years) for these product lines, for which the total sales in 2001 exceeded 600,000$ (rows), grouped by gender (columns)

18 Query 6 – Solution

19 Query 7 Show the sales amount (total over all years) for all products (Product Name) from the Road product line (rows), grouped by gender (columns). Products should be ordered by the order quantity.

20 Query 7 – Solution

21 Query 8 Show the sales amount and the order quantity over all products (columns) in 2001 and 2002 (rows). Also calculate in an additional column the average order value (sales amount / order quantity) Calculate in an additional row the difference between 2002 and 2001 for all reported measures/values

22 Query 8 – Solution


Download ppt "MDX in SQL Server 2008 Szymon Wilk (na podstawie materiałów przygotowanych przez Krzysztofa Dembczyńskiego) TWO, 2009/10."

Similar presentations


Ads by Google