SELECT TOP -
08-12-2005
, 04:25 AM
Hi
I am new to MDX coming from SQL, basically what I what is to convert
this type of statement to MDX
-- Weighted Handling
SELECT [T2].*
FROM (
SELECT [BrandFamily],
[GlobalPlayer]
FROM (
SELECT *
FROM (
SELECT TOP 20 [BrandFamily],
[Volume]
FROM [Channel]
) [T1]
UNION ALL
SELECT *
FROM (
SELECT TOP 5 [BrandFamily],
[Volume]
FROM [Channel]
WHERE [GlobalPlayer] = 'GP'
) [T2]
UNION ALL
SELECT *
FROM (
SELECT [BrandFamily],
[Volume]
FROM [Channel]
WHERE [BrandFamily] IN ('A1', 'A2', 'A3')
) [T3]
) [Players]
) [T1]
INNER JOIN (
SELECT [BrandFamily],
[Value]
FROM [Channel]
) [T2]
ON .......
So basically I need to extract from the table the TOP 20 [Brand
Family], The TOP 5 [Brand Family] when the [Global PLayer] is 'GP' and
the [Brand Family] ('A1', 'A2', 'A3'). These are extracted based on
their Volume, I then link these in and extract the [Brand Family] with
their [Value]. (I appreciate that the SQL could be different but I had
to do it this way for a reason).
So basically I need to extract these specific [Brand Family].
WHat is the best way to do this in MDX
Thanks in advance for you help
This is a great group!!
Denver |