Maximum of averages

Posted by Qtacz on Stack Overflow See other posts from Stack Overflow or by Qtacz
Published on 2010-03-13T19:07:00Z Indexed on 2010/03/13 19:15 UTC
Read the original article Hit count: 280

Filed under:
|

I'm supposed to get every departments average wage and only show the department with the highest average wage. I figured out this query, but it doesn't work. Anyone got some ideas?

SELECT department, max(avg(wage))
FROM employees
GROUP BY department;

I get this error: ERROR at line 1: ORA-00937: not a single-group group function

© Stack Overflow or respective owner

Related posts about sql

Related posts about oracle10g