Imagine a table of name, dept, salary
I want the results to be: for each department, i want
to know what the max salary is and the name of the person with this salary.
i've found an example which suggest the following would work:
SELECT name, max(salary), dept
FROM employee
GROUP BY dept...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.