Advertisement
jcarlosriverae

Untitled

Dec 1st, 2021
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. -- ====== LISTA DE MOVIMIENTOS SIMPLIFICADA ======
  2. select
  3. tac.id_cuenta_ahorro,
  4. -- tac.id_cuenta_ahorro_medio_pago,
  5. tac.fecha_alta
  6. , tac.id_transaccion,
  7. tac.valor_real,
  8. tac.monto,
  9. tac.concepto
  10. , tac.clave_rastreo
  11. -- ,tac.concepto_otro
  12. ,tac.tipo_movimiento
  13. -- , tac.id_cuenta_ahorro_medio_pago
  14. , case tac.tipo_movimiento
  15. when 30 then 'Abono'
  16. when 31 then 'Cargo'
  17. when 34 then 'Comisión'
  18. end as tipo_movimiento
  19. from alquimia_vitae.transacciones_ahorro_cliente tac
  20. where
  21. -- tac.id_producto_ahorro = 4 and -- cuentas persona moral
  22. -- id_cuenta_ahorro = 5382 -- in (1482,1545)
  23. -- 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
  24. -- id_cuenta_ahorro = 3202 -- BETWEEN 2712 and 3070 -- cuentas PF viernes 6 agosto
  25. -- and tac.clave_rastreo in ("AQPAY15920211015105921591944","AQPAY15920211015105921591991") -- like "%AQPAY000202108140021532149466"
  26. tac.clave_rastreo in( "AQPAY00020211201131431142936","AQPAY00020211201141139113787")
  27.  
  28. -- in ("BNET01002111260033757607","20211126400420000MIFE000696347","TX20211126134425127352087")
  29. -- tac.id_transaccion in (277855,277858,277869,277888,278528)
  30.  
  31. -- and concepto like "%spei-in%"
  32. -- and tac.tipo_movimiento = 34
  33. -- and
  34. -- and
  35. -- tac.fecha_alta >= '2021-11-01' -- and tac.fecha_alta <= '2021-12-01'
  36.  
  37. -- tac.id_medio_pago = 7
  38. -- and MONTH(fecha_alta) = 10
  39. -- and tac.monto <> 0 and monto <> 0.01 -- and concepto like "%comisi%spei%"
  40. -- and tipo_movimiento = 30 -- in( 30,31) -- abono
  41. order by
  42. id_cuenta_ahorro,
  43. -- id_transaccion desc
  44. fecha_alta desc -- , clave_rastreo asc
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement