select from_unixtime(st.pay_time,'%Y-%m-%d') as '支付时间',count(st.tid) '买单总订单数',round(sum(st.total_fee+IFNULL(st.post_fee,0)),2) '买单总销售金额' from systrade_trade st LEFT JOIN systrade_order so on st.tid=so.tid LEFT JOIN sysshop_shop sss ON st.shop_id=sss.shop_id where so.item_id=0 and st.`status` in ('WAIT_SELLER_SEND_GOODS','WAIT_BUYER_CONFIRM_GOODS','TRADE_FINISHED','TRADE_CLOSED') and st.tid in (select tid from systrade_order where title not like '%测试%' ) and from_unixtime(st.pay_time,'%Y-%m-%d')>='2018-11-01' GROUP BY from_unixtime(st.pay_time,'%Y-%m-%d') desc 我想要的是就算哪天没有订单也要用0 显示出来,请问可不可能实现呢,比如11-10是没有订单的所以没有显示出来,但是我想要用0来表示,请教下大神, |