Computer Science > QUESTIONS & ANSWERS > Strayer University, Washington - CIS 276Week 3 Assignment Practice 4 and 5 (All)

Strayer University, Washington - CIS 276Week 3 Assignment Practice 4 and 5

Document Content and Description Below

David Grof Practice 4 1. Group functions work across many rows to produce one result per group. a. True/False 2. Group functions include nulls in calculations. a. True/False 3. The WHERE clause ... restricts rows prior to inclusion in a group calculation. a. True/False 4. The HR department needs the following reports: Find the highest, lowest, sum, and average salary of all employees. Label the columns Maximum, Minimum, Sum, and Average, respectively. Round your results to the nearest whole number. Place your SQL statement in a text file named lab_04_04.sql. a. SELECT ROUND (MAX(salary),0) "Maximum", ROUND (MIN(salary),0) "Minimum", ROUND (SUM(salary),0) "Sum", ROUND (AVG(salary),0) "Average" FROM employees; 5. Modify the query in lab_04_04.sql to display the minimum, maximum, sum, and average salary for each job type. Resave lab_04_04.sql as lab_04_05.sql. Run the statement in lab_04_05.sql. a. SELECT job_id, ROUND (MAX(salary),0) "Maximum", ROUND (MIN(salary),0) "Minimum", ROUND(SUM(salary),0) "Sum", ROUND (AVG(salary),0) "Average" FROM employees GROUP BY job_id;6. Write a query to display the number of people with the same job. a. SELECT job_id, COUNT(*) FROM employees GROUP BY job_id; Generalize the query so that the user in the HR department is prompted for a job title. Save the script to a file named lab_04_06.sql.b. SELECT job_id, COUNT (*) FROM employees WHERE job_id = '&job_title' GROUP BY job_id; 7. Determine the number of managers without listing them. Label the column Number of Managers. a. SELECT COUNT (DISTINCT manager_id) "Number of Managers" FROM employees; 8. Find the difference between the highest and lowest salaries. Label the column DIFFERENCE. a. SELECT MAX (salary) - MIN (salary) DIFFERENCE FROM employees; [Show More]

Last updated: 2 years ago

Preview 1 out of 13 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$7.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

67
0

Document information


Connected school, study & course


About the document


Uploaded On

Apr 15, 2021

Number of pages

13

Written in

Seller


seller-icon
Muchiri

Member since 4 years

209 Documents Sold

Reviews Received
19
5
1
1
6
Additional information

This document has been written for:

Uploaded

Apr 15, 2021

Downloads

 0

Views

 67

Document Keyword Tags


$7.00
What is Scholarfriends

In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·