How to Get a Non-Aggregate value in an Aggregate Query
Suppose you want to find the maximum salary for each job in the emp table. This is very easy using using the max aggregate:
select job, max(sal) max_sal
from emp
group by job
order by job
;
JOB MAX_SAL
--------- -------
ANALYST 3000
CL...
talkapex.com3 min read