Explore BrainMass
Share

Explore BrainMass

    SQL Queries Using Group Statements

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

    • Write queries using the SQL GROUP statement to produce the requested reports as described below. In general, to make grouping meaningful, a function such as COUNT or SUM is used. In the below tasks, COUNT(*) is the desired function to include in your SELECT statement along with the requested fields.

    6. Display total number of employees for each job title. Columns should include Job_Title and 'Total Employees'. (Hint: use the "AS clause" to rename a column in the result set.)
    7. Display total number of employees for each salary. Columns should include Salary and 'Total Employees'.
    8. Display total number of employees for each salary within each job title. Columns should include Job Title, Salary, and 'Total Employees'.
    9. Display total number of employees for each salary grouped by exempt status. Columns should include Exempt, Salary, and 'Total Employees'.


    © BrainMass Inc. brainmass.com October 10, 2019, 8:09 am ad1c9bdddf
    https://brainmass.com/computer-science/databases/sql-queries-using-group-statements-610573

    Solution Summary

    Write queries using the SQL GROUP statement to produce the requested reports as described below. In general, to make grouping meaningful, a function such as COUNT or SUM is used. In the below tasks, COUNT(*) is the desired function to include in your SELECT statement along with the requested fields.
    - Display total number of employees for each job title. Columns should include Job_Title and 'Total Employees'.
    - Display total number of employees for each salary. Columns should include Salary and 'Total Employees'.
    - Display total number of employees for each salary within each job title. Columns should include Job Title, Salary, and 'Total Employees'.
    - Display total number of employees for each salary grouped by exempt status. Columns should include Exempt, Salary, and 'Total Employees'.


    $2.19