Explore BrainMass

Explore BrainMass

    Microsoft SQL Server 2000

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

    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 March 4, 2021, 6:06 pm ad1c9bdddf
    https://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.

    $2.19

    ADVERTISEMENT