Microsoft SQL Server 2000
1. Database Tables
TABLE: Employees
Job_title_code
Social_security_number
Last_name
First_name
Address
City
State
Zip_code
Telephone_area_code
Telephone_number
Email_address
Hire_date
Salary
TABLE: Job_title
Job_title_code
Job_title
Exempt_non_exempt_status
Minimum_salary
Maximum_salary
2. Write SQL statements to:
A. Calculate the average salary for all employees.
B. Calculate the maximum salary for exempt employees and the maximum salary for non-exempt employees.
C. Calculate the maximum salary for all employees.
D. Calculate the minimum salary for exempt employees and the maximum salary for non-exempt employees.
E. Calculate the minimum salary for all employees.
© BrainMass Inc. brainmass.com December 24, 2021, 5:07 pm ad1c9bdddfhttps://brainmass.com/computer-science/sql/microsoft-sql-server-2000-29126
Solution Preview
A. Calculate the average salary for all employees.
SELECT Avg(Salary) as Avgsalary FROM Employees;
B. Calculate the maximum salary for exempt employees and the maximum salary for non-exempt employees.
SELECT Max(Employees.Salary) AS MaxOfSalary, Job_title.Exempt_non_exempt_status FROM Employees, Job_title ...
Solution Summary
Microsoft SQL Server 2000 is emphasized in the solution.