dinsdag 19 oktober 2010

Again some simple MDX queries

Hi,

I gathered again some simple MDX queries which you can try and run on the AdventureWorks 2008 R2 database.

select
from
[Adventure Works];
GO

select
from
[Adventure Works]
where [Measures].[Reseller Sales Amount];
GO

select
from
[Adventure Works]
where [Measures].[Internet Sales Amount];
GO

select
[Measures].[Reseller Sales Amount]
on columns
from
[Adventure Works];
GO

select
[Date].[Calendar].[Calendar Year]
on columns
from
[Adventure Works];
GO

select
{[Date].[Calendar].[Calendar Year],[Date].[Calendar]}
on columns
from
[Adventure Works];
GO

select
{[Date].[Calendar].[Calendar Year],[Date].[Calendar]}
on columns,
[Product].[Product Categories].[Category]
on rows
from
[Adventure Works];
GO

select
{[Date].[Calendar].[Calendar Year],[Date].[Calendar]}
on columns,
{[Product].[Product Categories].[Category],[Product].[Product Categories]}
on rows
from
[Adventure Works];
GO

select
non empty {[Date].[Calendar].[Calendar Year],[Date].[Calendar]}
on columns,
{[Product].[Product Categories].[Category],[Product].[Product Categories]}
on rows
from
[Adventure Works];
GO

select
{[Date].[Calendar].[Calendar Year],[Date].[Calendar]}
on columns,
{[Product].[Product Categories].[Category],[Product].[Product Categories]}
on rows
from
[Adventure Works]
where [Measures].[Internet Sales Amount];
GO

select
non empty {[Date].[Calendar].[Calendar Year],[Date].[Calendar]}
on columns,
non empty {[Product].[Product Categories].[Category],[Product].[Product Categories]}
on rows
from
[Adventure Works]
where [Measures].[Internet Sales Amount];
GO

Greetz,
Hennie

Geen opmerkingen:

Een reactie plaatsen