Share
Explore BrainMass

Sql Queries for Employees, Salary, Job tables

Need help quickly with some SQL queries. I am using SQL 2005 express.
Please help.

Using the database, tables, and data, write SQL statements to:
? Calculate the average salary for employees for each state.
? Calculate the maximum salary for exempt employees and the maximum salary for non-exempt employees.
? Calculate the maximum salary for all employees whose hire_date is between two dates.
? Calculate the maximum salary for employees within each job class
? Calculate the minimum salary for exempt employees and the maximum salary for non-exempt employees.
? Calculate the total salary for employees separated by gender within each job class
? Determine the oldest and youngest employees and provide the age for each category.
? Determine what percent of the largest salary is used for the total payroll in the company.

Attachments

Solution Preview

Find attached the file with sql queries. Example.

-- Calculate the average salary for employees for each state.
SELECT state, AVG(salary) as ...

Solution Summary

The solution contains a complete SQL script for the required queries.

$2.19