Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a query to get the average salaries of jobs grouped by their department number. List all employees in the Sales, and Operations departments using

image text in transcribedimage text in transcribed

  1. Write a query to get the average salaries of jobs grouped by their department number.
  2. List all employees in the Sales, and Operations departments using subquery.
  3. Write a query to get the maximum salaries of each department using department numbers where the minimum salary is greater than 100.
  4. Write a query to show the employees whose departments are in New York city. Display only the data from the employee table. (use sub query)
  5. Write a query that displays the name of the Department where the average salary is maximum. (use sub query)
  6. Write a query to display all department numbers where the minimum salary is greater than the minimum salary of department number 30 .

    IN SQL

    Do these tasks in as simple way as possible and if all tasks done correctly i will surely give thumbs up. TABLE NAME IS TABLE 1 ..2 AND SO ON

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 300 500 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7654 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER 1400 CLERK SALESMAN SALESMAN MANAGER SALESMAN MANAGER MANAGER ANALYST PRESIDENT SALESMAN CLERK CLERK ANALYST CLERK 7902 17-DEC-80 7698 20-FEB-81 7698 22-FEB-81 7839 02-APR-81 7698 28-SEP-81 783901-MAY-81 7839 09-JUN-81 7566 09-DEC-82 17-NOV-81 7698 08-SEP-81 7788 12-JAN-83 7698 03-DEC-81 7566 03-DEC-81 7782 23-JAN-82 800 1600 1250 2975 1250 2850 2450 3000 5000 1500 1100 950 3000 1300 20 30 30 20 30 30 10 20 10 30 20 30 20 10 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 300 500 20 30 30 20 1400 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7654 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER CLERK SALESMAN SALESMAN MANAGER SALESMAN MANAGER MANAGER ANALYST PRESIDENT SALESMAN CLERK CLERK ANALYST CLERK 7902 17-DEC-80 7698 20-FEB-81 7698 22-FEB-81 7839 02-APR-81 7698 28-SEP-81 7839 01-MAY-81 7839 09-JUN-81 7566 09-DEC-82 17-NOV-81 7698 08-SEP-81 7788 12-JAN-83 7698 03-DEC-81 7566 03-DEC-81 7782 23-JAN-82 800 1600 1250 2975 1250 2850 2450 3000 5000 1500 1100 950 3000 1300 30 30 10 20 10 30 20 30 20 10 DEPTNO DNAME LOC 10 ACCOUNTING 20 RESEARCH 30 SALES 40 OPERATIONS 10 ACCOUNTING 20 RESEARCH 30 SALES 40 OPERATIONS NEW YORK DALLAS CHICAGO BOSTON NEW YORK DALLAS CHICAGO BOSTON

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

Step: 3

blur-text-image

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Different types of Grading?

Answered: 1 week ago

Question

Explain the functions of financial management.

Answered: 1 week ago

Question

HOW MANY TOTAL WORLD WAR?

Answered: 1 week ago

Question

Discuss the scope of financial management.

Answered: 1 week ago