日销售额SQL:
select left(订单编码,8) as 日期,sum(销售额) as 日销售额 from [表名] group by left(订单编码,8)
月销售额SQL:
select left(订单编码,6) as 月份,sum(销售额) as 月销售额 from [表名] group by left(订单编码,6)
年销售额SQL:
select left(订单编码,4) as 年份,sum(销售额) as 年销售额 from [表名] group by left(订单编码,4)
----小宇飞刀 http://www.jxstnu.cn/xieyunc/