SELECT FROM
[Adventure Works];

SELECT
FROM [Adventure Works]
WHERE ([Date].[Calendar Year].&[2002]);

SELECT
FROM [Adventure Works]
WHERE ([Date].[Calendar Year].&[2002], [Sales Territory].[Sales Territory Country].&[United States]);

SELECT [Measures].[Internet Sales Amount] ON 0
FROM [Adventure Works];

SELECT [Measures].[Internet Sales Amount] ON COLUMNS
FROM [Adventure Works];

SELECT [Measures].[Internet Sales Amount] ON 0,
[Sales Territory].[Sales Territory Country] ON 1 
FROM [Adventure Works];

WITH MEMBER Measures.Srednia AS '[Measures].[Internet Sales Amount]/[Measures].[Customer Count]'
SELECT Measures.Srednia ON 0
FROM [Adventure Works];

SELECT {[Measures].[Reseller Sales Amount], [Measures].[Reseller Gross Profit]} ON 0
FROM [Adventure Works];

SELECT {[Sales Territory].[Sales Territory Country].[All Sales Territories],
[Sales Territory].[Sales Territory Country].&[United States],
[Sales Territory].[Sales Territory Country].&[United Kingdom]} ON 0
FROM [Adventure Works];

SELECT {[Sales Territory].[Sales Territory Country].[All Sales Territories],
[Date].[Calendar Year].&[2002]} ON 0
FROM [Adventure Works];

SELECT 
FROM [Adventure Works]
WHERE {[Sales Territory].[Sales Territory Country].&[United States],
[Sales Territory].[Sales Territory Country].&[United Kingdom]};

SELECT {[Sales Territory].[Sales Territory Country].&[United States],
[Sales Territory].[Sales Territory Country].&[United Kingdom]} ON 0,
{[Sales Territory].[Sales Territory Country].[All Sales Territories], 
[Sales Territory].[Sales Territory Country].&[NA]} ON 1
FROM [Adventure Works];

SELECT {[Measures].[Gross Profit],
[Measures].[Sales Amount],
[Measures].[Average Sales Amount]} ON 0,
{[Sales Territory].[Sales Territory Group].[All Sales Territories],
[Sales Territory].[Sales Territory Group].&[Europe],
[Sales Territory].[Sales Territory Group].&[North America],
[Sales Territory].[Sales Territory Group].&[Pacific]} ON 1
FROM [Adventure Works];

SELECT {[Measures].[Gross Profit],
[Measures].[Sales Amount],
[Measures].[Average Sales Amount]} ON 0,
{[Sales Territory].[Sales Territory Group].[All Sales Territories],
[Sales Territory].[Sales Territory Group].&[Europe],
[Sales Territory].[Sales Territory Group].&[North America],
[Sales Territory].[Sales Territory Group].&[Pacific]} ON 1,
{[Date].[Calendar Year].&[2001], [Date].[Calendar Year].&[2002]} ON 2
FROM [Adventure Works];

SELECT {[Measures].[Gross Profit],
[Measures].[Sales Amount],
[Measures].[Average Sales Amount]} ON 0,
{[Sales Territory].[Sales Territory Group].[All Sales Territories],
[Sales Territory].[Sales Territory Group].&[Europe],
[Sales Territory].[Sales Territory Group].&[North America],
[Sales Territory].[Sales Territory Group].&[Pacific]} ON 1
FROM [Adventure Works]
WHERE {[Date].[Calendar Year].&[2001], [Date].[Calendar Year].&[2002]};

WITH SET EuropaAmeryka AS
{[Sales Territory].[Sales Territory Group].&[Europe],
[Sales Territory].[Sales Territory Group].&[North America]}
SELECT
EuropaAmeryka ON COLUMNS,
[Measures].[Customer Count] ON ROWS
FROM [Adventure Works];

SELECT 
[Product].[Category].MEMBERS ON COLUMNS
FROM [Adventure Works];

SELECT 
[Product].[Category].MEMBERS ON COLUMNS,
[Employee].[Employees].MEMBERS ON ROWS
FROM [Adventure Works];

SELECT 
[Product].[Product Categories].[Category].&[1].CHILDREN ON 0
FROM [Adventure Works];

SELECT {[Measures].[Reseller Order Count],
[Measures].[Reseller Sales Amount]} ON 0,
DESCENDANTS ([Employee].[Employees].&[277]) ON 1
FROM [Adventure Works];

SELECT {[Measures].[Reseller Order Count],
[Measures].[Reseller Sales Amount] } ON 0,
DESCENDANTS ([Employee].[Employees].&[277],,LEAVES) ON 1
FROM [Adventure Works];

SELECT {[Measures].[Reseller Order Count],
[Measures].[Reseller Sales Amount] } ON 0,
DESCENDANTS ([Product].[Product Categories].[Category].&[1],
[Product].[Product Categories].[Product]) ON 1
FROM [Adventure Works];

SELECT {[Measures].[Reseller Order Count],
[Measures].[Reseller Sales Amount] } ON 0,
DESCENDANTS ([Employee].[Employees],,LEAVES) ON 1
FROM [Adventure Works];

SELECT HEAD([Date].[Calendar].[Month].MEMBERS,3) ON 0
FROM [Adventure Works];

SELECT TAIL([Date].[Calendar].[Calendar Quarter].MEMBERS,1) ON 0
FROM [Adventure Works];

SELECT 
CROSSJOIN ([Date].[Calendar].[All].CHILDREN,
{[Measures].[Sales Amount],[Measures].[Tax Amount]}) ON 0,
{[Product].[Product Categories].[Category].&[1],
[Product].[Product Categories].[Category].&[1].CHILDREN } ON 1
FROM [Adventure Works];

