Learning sql, as per title trying to print min and max values of a given column (sal) for each values in another (nodept). Using this query so far:
SELECT Nodept, sal FROM emp
WHERE sal IN ((SELECT MAX (sal) FROM emp), (SELECT MIN (sal) FROM emp))
Which works but only returns absolute min max and not min max for every entry in nodept. Documentation says it should be a simple matter of adding GROUP BY to the query but i fail to find the syntax for it.
Ty for the input.