3
Guys, I want to know how do I list only the function that has the highest salary and not the highest salaries of all functions, does anyone give me a light? Go on like I’m doing:
select max(Salario) from Funcionarios group by Funcao;
I also did so:
select max(Salario) from Funcionarios;
And that’s the last way I want it. I want to display the highest salary of all functions and also the name of this function that has the highest salary, but I do not know how to do.
If there is more than one function with the same salary, how will it be treated? It is to display all?
– Marcelo de Andrade
I hadn’t thought of that possibility. In the example I did, I put different salaries.
– wen-dell
Exactly, Higor’s answer solves your problem but this situation may occur.
– Marcelo de Andrade