Explore BrainMass
Share

Sql Queries for Employees, Salary, Job tables

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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.

© BrainMass Inc. brainmass.com March 21, 2019, 7:04 pm ad1c9bdddf
https://brainmass.com/computer-science/sql/sql-queries-for-employees-salary-job-tables-278608

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