我是MDX的新手,我还回顾了SQL与MDX查询的比较。但是我仍然无法摆脱MDX的困扰。
我正在尝试将下面的SQL转换为MDX。
SELECT CAST(A.Num AS FLOAT)/A.Denom AS "Denial Rate"
FROM (
SELECT COUNT(CASE WHEN LargestAdjustmentType = 'Denial' THEN LargestAdjustmentType end) AS Num, COUNT(*) AS Denom FROM vwremits) a
香港专业教育学院写成MDX
Select [Measures].[Denial Rate]
AS [Measures].[Count] AS [AdjustmentType].["Denial"]
请你帮助我好吗。
最佳答案
如果没有看到多维数据集结构中存在什么度量和层次结构,那么这个问题就无法回答-因此,这是一个黑暗的刺探:
WITH [Measures].[Denial Rate] AS
[Measures].[Count]
SELECT
{} ON 0,
[Measures].[Denial Rate] ON 1
FROM [CubeName]
WHERE [AdjustmentType].[AdjustmentType].[Denial];
要不就:
SELECT
[AdjustmentType].[AdjustmentType].[Denial] ON 0,
[Measures].[Count] ON 1
FROM [CubeName];
关于mysql - 如何将带有Where条件和大小写的SQL查询转换为MDX,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40382533/