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')
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章