学习帆软ing(提问者)我原来的语句如下,方便按照您的格式改一下么:
SELECT ZICZS0000,SUM(ZIFXAV010) AS JE,
SUM(ZIFXAJ022) AS JS,SUM(ZIFXAW023) AS KZ
FROM \"_SYS_BIC\".\"CB.AL.YW/ZAL_SALES_DETAIL_MAIN\"
WHERE 1=1
AND CALDAY >=${Q5}
AND CALDAY <=${E5}
AND ZICYY0010 = \'06\'
AND ZICZB0075 <> \'N\'
AND ZICXA0005 = \'Y\'
AND ZICZA0001 IN (\'Z002\',\'Z003\',\'Z009\')
AND ZICZA0003 NOT IN (\'1110\',\'1111\')
AND ZICZA0012 <> \'K08\'
GROUP BY ZICZS0000
ORDER BY ZICZS0000