Advertisement
nhorquender

Untitled

Aug 12th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. SELECT datos.* FROM
  2. (SELECT cuenta,clave_referencia,clave,bloqueo FROM tbl_deudas_clientes WHERE cuenta=757172 AND clave2=9999 GROUP BY bloqueo,cuenta order by cuenta) datos
  3. LEFT join
  4. (SELECT cuenta, bloqueo FROM tbl_deudas_clientes WHERE cuenta=757172 AND clave2=9999 AND bloqueo = 'H' GROUP BY cuenta, bloqueo order by cuenta) filtro
  5. ON datos.cuenta = filtro.cuenta
  6. WHERE filtro.cuenta IS null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement