Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Query nova de selecao do sdr
- select distinct p.num_cpf as cpf, 100 as melhornota,
- case when v.produtoid = 1 then 'NOVO'
- when v.produtoid = 2 then 'REFIN'
- when v.produtoid = 3 then 'PORTABILIDADE' end as melhorproduto,
- p.nome,p.email, p.telefone, p.matricula
- from meutudo.vendingmachine v
- inner join public.tb_pessoa_meutudo p on p.num_cpf = v.cpf and p.matricula = v.matricula
- where p.telefone is not null;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement