select A列 ,B列 ,C 列,sum(num)n
fron test
group by A列 ,B列 ,C 列
如何实现 ABC三列动态展示 test表会有D列 ,F列 ,只需要ABC
如下图,想要实现dapartment family 商品层级三个维度动态列如何实现
select sum() ${if(len(a)==0,"",",a")} ${if(len(b)==0,"",",b")} ${if(len(c)==0,"",",c")} from tmp ${if(len(a)==0&&len(b)==0&&len(c)==0,"","group by "+JOINARRAY(array(if(len(a)==0,"","a"),if(len(b)==0,"","b"),if(len(c)==0,"","c")),","))}
动态列-https://help.fanruan.com/finereport/doc-view-3966.html
看下文档里面有好几种方法 看看你适合哪个