daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select * from op_anticipo_emp op
  2. inner join documento d on d.id=op.op_id
  3. left join (select sum(doc.importe_moneda_base) suma, rg.op_anticipo_emp_id from RG_GASTO_EMPLEADO rg inner join documento doc on doc.id=rg.op_id group by rg.op_anticipo_emp_id) kk on kk.op_anticipo_emp_id=d.id
  4. where d.duenio='dsalguero' and (d.importe_moneda_base>kk.suma or kk.suma is null)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top