Question
5. Write the SQL query to find sum of salaries for each of the job ids (JOB_ID) in each of the departments (DEPT_ID). Ensure the
5. Write the SQL query to find sum of salaries for each of the job ids (JOB_ID) in each of the departments (DEPT_ID). Ensure the output report is sorted by Departments:
6. Create an SQL statement that will display the maximum salary of each of the departments from the EMPLOYEES table. Group the output by department. In the display, we only want to see those department salaries where the maximum salary is over 10000. Your report output should look like: DEPARTMENT IDMAX(SALARY) 12008 11000 24000 13000 12008 14000 100 30 90 20 110 80 2 4
7. Create an SQL statement that displays a report containing departments, the job ids, and sums of the salaries from the EMPLOYEES table. We only want to see those departments with a department id greater than 40. The output should be grouped by the department id and then the job id and the output order should be by department id. Moreover, we only want those SUM(SALARY) values that are over (greater than) 30000
DEPARTMENT IDMAX(SALARY) 12008 11000 24000 13000 12008 14000 100 30 90 20 110 80 2 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started