Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ====== LISTA DE MOVIMIENTOS SIMPLIFICADA ======
- select
- tac.id_cuenta_ahorro,
- -- tac.id_cuenta_ahorro_medio_pago,
- tac.fecha_alta
- , tac.id_transaccion,
- tac.valor_real,
- tac.monto,
- tac.concepto
- , tac.clave_rastreo
- -- ,tac.concepto_otro
- ,tac.tipo_movimiento
- -- , tac.id_cuenta_ahorro_medio_pago
- , case tac.tipo_movimiento
- when 30 then 'Abono'
- when 31 then 'Cargo'
- when 34 then 'Comisión'
- end as tipo_movimiento
- from alquimia_vitae.transacciones_ahorro_cliente tac
- where
- -- tac.id_producto_ahorro = 4 and -- cuentas persona moral
- -- id_cuenta_ahorro = 5382 -- in (1482,1545)
- -- id_cuenta_ahorro in (3560,3938,3939,3786, 3888, 3768, 3786, 3769, 3770, 3787, 3788, 3789, 3790, 3791, 3792, 3793, 3867, 3795, 3796, 3794, 3797, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3826, 3827, 3828, 3829, 3831, 3832, 3774, 3830, 3833, 3834, 3835, 3836, 3837, 3775, 3838, 3839, 3840, 3841, 3842, 3843, 3844, 3778, 3845, 3777, 3776) -- IN (2084,2085,2086,2087,2094,2096,2103,2104,2108) -- = 1802 and -- not in ( 1459, 1461, 1531, 1532, 1533, 1534, 1553, 1554, 1555, 1593, 1738, 1739, 1740, 1741, 1742, 1743) -- 1662 -- in (1587,1586,1495,1494,1493,1492,1491,1490,1489,1488,1487,1486) -- MARYEL
- -- id_cuenta_ahorro = 3202 -- BETWEEN 2712 and 3070 -- cuentas PF viernes 6 agosto
- -- and tac.clave_rastreo in ("AQPAY15920211015105921591944","AQPAY15920211015105921591991") -- like "%AQPAY000202108140021532149466"
- tac.clave_rastreo in( "AQPAY00020211201131431142936","AQPAY00020211201141139113787")
- -- in ("BNET01002111260033757607","20211126400420000MIFE000696347","TX20211126134425127352087")
- -- tac.id_transaccion in (277855,277858,277869,277888,278528)
- -- and concepto like "%spei-in%"
- -- and tac.tipo_movimiento = 34
- -- and
- -- and
- -- tac.fecha_alta >= '2021-11-01' -- and tac.fecha_alta <= '2021-12-01'
- -- tac.id_medio_pago = 7
- -- and MONTH(fecha_alta) = 10
- -- and tac.monto <> 0 and monto <> 0.01 -- and concepto like "%comisi%spei%"
- -- and tipo_movimiento = 30 -- in( 30,31) -- abono
- order by
- id_cuenta_ahorro,
- -- id_transaccion desc
- fecha_alta desc -- , clave_rastreo asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement