I'm having trouble listing only one line in each process.
The query must always bring the protocols with the last revision.
Ex: Show only the process of number 2 of the last revision 2
and Show only the process of number 1 of the last revision 3
Select
Numero_Processo Processo
, Numero_Revisao Revisao
,Titulo
,Id
,Data_Criacao
FROM Qualidade_Insp_Inj_Processo
WHERE Data_Exclusao is null
order by Numero_Processo desc, Numero_Revisao desc
I've tried Group By, but as the field revision is always different it brings all the protocols with all the revisions