我查了用户手册有关rank的用法,执行下面语句时出错如下图:
手册中rank用法:
rank(X, [ascending=true], [groupNum], [ignoreNA=true], [tiesMethod=’min’])
中括号表示可选参数,上述代码中把中括号去掉,10改成groupNum=10就可以了
select rank(close, ascending=true,groupNum=10,tiesMethod='min') from t context by ticker