mdx语句,如何返回前10行数据(合同金额降序排序)?
要求返回前10行数据(合同金额降序排序):
度量值:[Measures].[合同金额]
维度:[供应商].[供应商名称]
Cube: 合同
[最优解释]
select {[Measures].[合同金额]} on columns,
Order(topcount([供应商].[供应商名称].members,10,[Measures].[合同金额]),DESC) on rows
from [合同]
[其他解释]
select {[Measures].[合同金额]} on 0
bottomcount([供应商].[供应商名称],10,[Measures].[合同金额]) on 1
from [合同]
[其他解释]
select {[Measures].[合同金额]} on 0
order(topcount([供应商].[供应商名称],10,[Measures].[合同金额]),[Measures].[合同金额],desc) on 1
from [合同]
[其他解释]
select top 10 * from tb order by 合同金额 desc
select {[Measures].[合同金额]} on columns,
topcount([供应商].[供应商名称].members,10,[Measures].[合同金额]) on rows
from [合同]
select {
[Measures].[合同金额]
}on 0,
{
topcount([供应商].[供应商名称]
.[供应商名称],10,[Measures].[合同金额],desc)
} on 1 from [合同]