Question: Question 7 Use the tables in your schema. Alter the previous query to print out the average salary for all departments, showing the department name.

Question 7 Use the tables in your schema. Alter the previous query to print out the average salary for all departments, showing the department name. (Hint: use the "group by" clause see p121 of text) Order the output by lowest to highest average salary (Hint: use the column alias). Write this using SQL/92 with USING. Include a report header of "Average Salaries Per Department". Clear the title after running the report so it doesn't appear in the next query. Question 8 Use the tables in your schema. Alter the previous query to only print out those departments that have an average salary greater than 10,000 This time order the results in based on average salary in descending Sequence. HR DEPARTMENTS department_id department name manager_id location_id LOCATIONS location_id street address postal_code city state province country.id JOB HISTORY employee_id start date end date job_id department_id EMPLOYEES employee Id first name last name email phone number hire_date job_id salary commission_pct manager_id department_id COUNTRIES country id country name region id JOBS job id job_title min salary max_salary REGIONS region_id region_name
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
