SELECT ncuenta,dcuenta,SUM(-saldo) as monto2 FROM captura WHERE SUBSTR(NCUENTA,1,2)>='30'and SUBSTR(NCUENTA,1,2)<'39' and fecha<='2017-09-30' GROUP BY NCUENTA
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
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!