Posts by Sérgio D. • 1 point
1 post
-
0
votes5
answers97
viewsA: Doubt with Select using ORDER BY
--Resultado desejado select tmp.*, b.descricao from ( select distinct(a.id_a) , a.produto , a.tipo , max(b.dta_renovacao) as dta_renovacao from tab_a a left join tab_b b on b.id_a = a.id_a group by…