SQL Fundamentals - Practice 04
SQL Fundamentals - Practice 04
Determine the validity of the following three statements. Circle either True or False.
1. Group functions work across many rows to produce one result per group.
True/False
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.
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.
7. Determine the number of managers without listing them. Label the column Number of
Managers. Hint: Use the MANAGER_ID column to determine the number of managers.
8. Find the difference between the highest and lowest salaries. Label the column
DIFFERENCE.
11. Create a matrix query to display the job, the salary for that job based on department
number, and the total salary for that job, for departments 20, 50, 80, and 90, giving each
column an appropriate heading.