a 表存在 b表不存在的訂單

select A.* from tb_card_bill as A where  A.business_order_no not in (select B.out_trade_no from tb_card_order as B  where  statuses='3' ) AND date_format(a.trans_date, '%Y-%m-%d') = '2020-05-13' and  business_name='飯卡充值' ;


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章