View Full Version : Salary Query


viviblue
04-16-2004, 06:02 AM
Hi there,

I am wanting to work out which employees earn more than the average salary.

The fields i am using is FirstName, LastName, Sex, DOB and Salary.

I can work out the average salary with out putting in the Names Sex DOB for a company average but i can get the employees one to work.

Thanks

Jon K
04-16-2004, 06:39 AM
Type/Paste in the SQL View of a new query, replacing with the correct table name:-

SELECT FirstName, LastName, Sex, DOB, Salary
FROM [tableName]
WHERE Salary >(SELECT Avg(Salary) AS AvgOfSalary
FROM [tableName]);