不知道SQL到MDX
我不知道如何在MDX中进行操作,因为我只在SQL中工作,但是如何将此查询从SQL转换为MDX?
select monthname, sum(sales) sales
from table
where dt between 20190315 and 20220204
group by monthname;
感谢您的关注和帮助。
I have no idea how to do it in mdx as I have only worked in sql but how do I translate this query from sql to mdx?
select monthname, sum(sales) sales
from table
where dt between 20190315 and 20220204
group by monthname;
Thank you for your attention and help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请注意假设可以来回翻译SQL和MDX。多维数据库的性质意味着适用于两种查询语言的基本概念非常不同。
有时,您当然可以得到类似的答案。就您而言,以下MDX会给您所追求的东西...
尽管这将介绍20190301至20220228,这并不是您的SQL查询所做的。
Be careful of assuming that SQL and MDX can be translated back and forth. The nature of multi-dimensional databases means that the basic concepts which apply to the two query languages are very different.
Sometimes you can get similar answers, of course. In your case, the following MDX would give the sort of thing you were after...
... although this would look at 20190301 to 20220228 which is not exactly what your SQL query did.