首页统计全部数据

dev
徐杰盟 2024-01-11 09:46:14 +08:00
parent 8ce5f99495
commit 8cb733c47d
1 changed files with 7 additions and 4 deletions

View File

@ -180,9 +180,12 @@ group by date
" ifnull(sum(t.weight), 0) total_weight,\n" +
" ifnull(sum(t.total_price), 0) total_price,\n" +
" ifnull(sum(t.count), 0) truck_cnt,\n" +
" ifnull(sum(case when t.date >= ? and t.sale_type = 0 then t.weight end ), 0) year_total_weight,\n" +
" ifnull(sum(case when t.date >= ? and t.sale_type = 0 then t.total_price end ), 0) year_total_price,\n" +
" ifnull(sum(case when t.date >= ? and t.sale_type = 0 then t.count else 0 end ), 0) year_truck_cnt,\n" +
// " ifnull(sum(case when t.date >= ? and t.sale_type = 0 then t.weight end ), 0) year_total_weight,\n" +
" ifnull(sum(case when t.date >= ? and then t.weight end ), 0) year_total_weight,\n" +
// " ifnull(sum(case when t.date >= ? and t.sale_type = 0 then t.total_price end ), 0) year_total_price,\n" +
" ifnull(sum(case when t.date >= ? then t.total_price end ), 0) year_total_price,\n" +
// " ifnull(sum(case when t.date >= ? and t.sale_type = 0 then t.count else 0 end ), 0) year_truck_cnt,\n" +
" ifnull(sum(case when t.date >= ? then t.count else 0 end ), 0) year_truck_cnt,\n" +
" ifnull(sum(case when t.date >= ? then t.weight end ), 0) month_total_weight,\n" +
" ifnull(sum(case when t.date >= ? then t.total_price end ), 0) month_total_price,\n" +
" ifnull(sum(case when t.date >= ? then t.count else 0 end ), 0) month_truck_cnt,\n" +
@ -203,7 +206,7 @@ group by date
" ifnull( count( t.sn ), 0 ) month_truck_cnt,\n" +
" ifnull( sum( t.weight ), 0 ) day_total_weight,\n" +
" ifnull( sum( t.total_price ), 0 ) day_total_price,\n" +
" ifnull( count( t.sn ), 0 ) month_truck_cnt \n" +
" ifnull( count( t.sn ), 0 ) day_truck_cnt \n" +
" FROM\n" +
" order_temp t \n" +
" WHERE\n" +