E列和Q列的日期值都是用日期公式计算出来的,我希望在S列计算出每个部门不同日期区间的销售。但我这么写会报错,跑不出结果来。。是因为数据集的运行结果会优先于单元格日期公式的结果吗?还是我的写法不对?这种情况应该怎么下手?原数据集如下。听说需要改成SQL函数写法才能取到单元格的日期值吗? SELECT CALDAY,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 CALDAY,ZICZS0000