How do I bring up any field, by the largest ID of the table. I made a MAX (Field1), Field2 and had to do a grouping by Field2 and the result it brought me several Field2 and not just one that has the largest ID.
Select MAX(ID), campo2 from tabela where campo3 = valor group by campo2
This did not work, it brought me several field2