在sql数据集里添加了动态参数col,参数值范围:A,B
SELECT
${if(len(col)=0,'C表字段名',col)},sum(D)D,SUM(E)E FROM C表
where 1=1
${if(len(col)<1,'group by A, B
order by A,B',"group by "+col+" order by " + col + "")}
怎么在数据集里对 A,B列自定义排序呢?例如A列按照(三,一,二)顺序排序,B列按照拼音排序
WorkBook1.cpt
是你要的么?
排序跟group by有什么关系,
${if(len(col)=0,'*',col)} FROM C表
${if(len(col)<1,"order by A,B"," order by " + col )}