Create or replace view processos_advogado as select id, senteca from processo where cpf_reu in (select cpf from reu where oab_advogado is not NULL); CREATE VIEW View_Reu_Testemunha as select cpf_reu from processo where id in (select id_processo from testemunhar where cpf_testemunha = '17') ; select id from processos_advogado where senteca = 'culpado'; select cpf_reu from View_Reu_Testemunha; select * from Reu_Testemunha;