SELECT a.mpay_type_txt,a.银联卡日支付, b.银联卡月支付, c.银联卡年支付 FROM (select mpay_type_txt, sum(amount)/10000 as '银联卡日支付' from lsyw_yp_payinfo_d_hy group by mpay_type_txt where calday =translate(substr(date_sub(CURRENT_DATE(),1) , 1 ,10 ),'-','') and mpay_type_txt="银联卡" )a full join from (select mpay_type_txt, sum(amount)/10000 as '银联卡月支付' from lsyw_yp_payinfo_hy group by mpay_type_txt where calmonth =translate(substr(date_sub(CURRENT_DATE(),1) , 1 ,7 ),'-','') and mpay_type_txt="银联卡" )b on a.mpay_type_txt = b.mpay_type_txt full join (select mpay_type_txt, sum(amount)/10000 as '银联卡年支付' from lsyw_yp_payinfo_d_hy group by mpay_type_txt where calday =translate(substr(date_sub(CURRENT_DATE(),1) , 1 ,4 ),'-','') and mpay_type_txt="银联卡" )c on a.mpay_type_txt =c.mpay_type_txt |
最佳回答 |
||||
0
|
|