select * from hacerto where id_acerto in
(select id_acerto from acerto where cd_ua = 130 and id_desvio in
(select id_desvio from desvio where id_conta = 831 ))
UNION all
select * from hacerto where id_acerto in
(select id_acerto from acerto where cd_ua = 130 and id_conta = 809)