请问为什么这里会报错

image.png

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

FineReport 用户x076327 发布于 2022-5-18 09:25
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
重庆一棵草Lv4中级互助
发布于2022-5-18 09:40

image.png

  • 2关注人数
  • 234浏览人数
  • 最后回答于:2022-5-18 09:40
    请选择关闭问题的原因
    确定 取消
    返回顶部