Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- SUM(vlr_fat_cli) "Total",
- nom_cad_cli "Nome"
- FROM
- cadastro_cliente
- WHERE
- --Seleciona as faturas em aberto
- cod_fat_cli = 'AB'
- --Seleciona as faturas vencidas entre 60 e 120 dias
- AND venc_fat_cli BETWEEN trunc(sysdate -120) AND trunc(sysdate - 60)
- group by
- nom_cad_cli
- order by
- 1 desc
Add Comment
Please, Sign In to add comment