What is the difference of doing the search by select a. or b.?
Example:
select --a.num_duplicata,a.data_prorrogacao,a.seq_duplicatas,
a.cli_dup_cgc_cli9 as cgc9,a.cli_dup_cgc_cli4 as cgc4,a.cli_dup_cgc_cli2 as cgc2,b.nome_cliente as cliente,
sum(a.saldo_duplicata) as saldo_vencer
--a.saldo_duplicata
from fatu_070 a, pedi_010 b
where a.codigo_empresa > 0
and a.cli_dup_cgc_cli9 = b.cgc_9
and a.cli_dup_cgc_cli4 = b.cgc_4
and a.cli_dup_cgc_cli2 = b.cgc_2
and (b.grupo_economico = &gru or b.grupo_economico = &gru2)
and a.data_prorrogacao >= current_date - 1
--and b.nome_cliente like 'naya je%'
--and a.num_duplicata = 77486
group by a.cli_dup_cgc_cli9, a.cli_dup_cgc_cli4, a.cli_dup_cgc_cli2, b.nome_cliente
order by a.cli_dup_cgc_cli9, a.cli_dup_cgc_cli4, a.cli_dup_cgc_cli2, b.nome_cliente