Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a SQL Query to return the average of the salaries of employees in the organization 2. Write the SQL query to round the

1. Write a SQL Query to return the average of the salaries of employees in the organization

2. Write the SQL query to round the answer you got in question #1 above to 4 decimal places

3. Write the SQL query to return the sum of the salaries of employees in the organization. As part of your SQL query, change the name of the column header in your output report to exactly like: Total Salary

4. Write the SQL query to return the count of employees working in each department:

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:

image text in transcribed

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 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

5.1 Define recruitment and describe the recruitment process.

Answered: 1 week ago

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago

Question

4. Design a career management system.

Answered: 1 week ago

Question

4. Evaluation is ongoing and used to improve the system.

Answered: 1 week ago