Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- tac.id_cuenta_ahorro
- ,SUM(tac.valor_real)
- from
- alquimia_vitae.transacciones_ahorro_cliente tac
- WHERE
- tac.id_cuenta_ahorro in
- (
- select
- tac.id_cuenta_ahorro
- from
- transacciones_ahorro_cliente tac join cuenta_ahorro_medio_pago camp on camp.id_cuenta_ahorro = tac.id_cuenta_ahorro
- where camp.id_medio_pago = 4
- group by tac.id_cuenta_ahorro
- )
- and tac.fecha_alta >= '2021-09-01'
- and tac.tipo_movimiento = 34
- GROUP BY
- tac.id_cuenta_ahorro
Advertisement
Add Comment
Please, Sign In to add comment