在 Oracle 中它运行良好......
oracle的查询如下
Select distinct channel_id, position_id,datamonth,
percentile_cont(.9) within group (order by TRIM_PRE_ELIG_PAY)
over (partition by channel_id, position_id, datamonth) as TRIM_PRE_ELIG_PAY_90th_PERC
from Tablename
但是对于 SQL Server,我遇到了一个错误。这是 SQL Server 2008 的查询:
Select
distinct channel_id,
position_id, datamonth,
percentile_cont(.9) within group (order by TRIM_PRE_ELIG_PAY)
over (partition by channel_id) as TRIM_PRE_ELIG_PAY_90th_PERC
from table
错误:无法正确解析选择。无法生成输出。
我知道它可以在 SQL Server 2012 中正常工作,但在 SQL Server 2008 中需要另一种方法
任何人都可以帮助............