mysql 三表聯查 從未支付人的信息 not in用法

select DISTINCT(ur.account)as 工號,ur.name as 姓名 ,ur.alipay as 支付寶,ur.phone as 手機號 from 

(select r.alipay,r.phone,su.account,su.name from  user su ,userdes r,order_c1 cl where su.account=r.account and r.account=cl.cloudWorker and cl.state='unpaid') ur
where ur.account not in (select u.account from user u ,order_c1 c where u.account=c.cloudWorker and c.state='paid')
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章