Help with AVG SQL

Associate
Joined
2 Oct 2003
Posts
2,121
Location
Chester
I just cannot figure out how to select all Names where their Salary is greater than the Average for their DeptID.

Table structure is:

EmpID
Name
Salary
DeptID

Can anyone help please?
 
Which RDBMS are you using?

It's usually a good idea to give these details when asking for help...

Also.. really? You can't work it out, nor find it in the FIRST LINK in a Google search?

SELECT * FROM Table WHERE Column > AVG(Column)
 
Last edited:
Back
Top Bottom