forum

Home / DeveloperSection / Forums / Why does max function in sql return multiple values

Why does max function in sql return multiple values

Jayden Bell234508-May-2013
Hi Everyone!

I would like to display the player with the highest salary.

select  max(Salary) as highest_salary, p.[Last name]
from tbl_PlayersTable as p, tbl_team as t
where p.Team = t.TeamID
and TeamID = 1000
Group by p.[Last name]
The output is:

highest_salary  Last Name
   8000          Bosh
   7000          Wade
   6000          James
I just want to display (8000 Bosh since he is the player with highest salary).

Thanks in advance!

Updated on 08-May-2013

Can you answer this question?


Answer

1 Answers

Liked By