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...