Purchase Solution

SQL Queries Using Group Statements

Not what you're looking for?

Ask Custom Question

• 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'.


Purchase this Solution

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'.


Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Javscript Basics

Quiz on basics of javascript programming language.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

C# variables and classes

This quiz contains questions about C# classes and variables.