SQL语句统计每天、每月、每年的销售总额
1、每年 select year(ordertime) 年, sum(Total) 销售合计 from订单表 group by year(ordertime)2、每月 select year(ordertime) 年, month(ordertime) 月, sum(Total) 销售合计 from订单表 group by year(ordertime),month(ordertime3、每日 select year(ordertime) 年, month(ordertime) 月, day(ordertime) 日, sum(Total) 销售合计 from订单表 g...
Time:2023年12月01日 02:24:21 Read:139℃