你把status=12那个条件放到上面a表里面,也就是select * from (select * from tbwithdraw where status=12) a left join xxxx

解决方案 »

  1.   

    先在a表把status=12的排除,然后在进行关联
      

  2.   

    这个条件放到 where 后面,比如:where a.status=12
      

  3.   

    你现在的 a.ApplyDate not in (...) 和 a.status=12 都是 left join c 的关联条件。
    应该把 AND a.AppliDate 更改为  WHERE a.AppliDate 才是过滤条件。
      

  4.   

    c on  b.id=c.userid 后面接的 and  应该是where
      

  5.   

    status=12放在on后面,就只是关联条件
    放在where后才是过滤条件