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: 1 year ago

Preview 1 out of 13 pages

Reviews( 0 )

$7.00

Add to cart

Instant download

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

OR

GET ASSIGNMENT HELP
38
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 3 years

208 Documents Sold


Additional information

This document has been written for:

Uploaded

Apr 15, 2021

Downloads

 0

Views

 38

Document Keyword Tags

Recommended For You

What is Browsegrades

In Browsegrades, 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 © Browsegrades · High quality services·