每月彙總sql

SELECT  a.wx_id,b.phone,DATE_FORMAT(a.pay_time,'%Y-%m') as '月份',sum(a.pay_money) as  '總加油金額',sum(a.oil_lit) as '總加油升數',sum(pay_method) as '加油總次數不區分月份' FROM order_wxgzh as a  LEFT JOIN user as b on a.u
相關文章
相關標籤/搜索