Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a query to get the maximum salary employee. Write a query to get the average salary of Clerk Write a query to get the

  1. Write a query to get the maximum salary employee.
  2. Write a query to get the average salary of “Clerk”
  3. Write a query to get the average salary of department number 30
  4. Write a query to get the minimum salary of department number 30, the salary should add commission
  5. Count the number of employees in the “Sales” department. Use sub queries.
  6. Write a query to get the average salaries of all departments. Show the department number along with the average salary.
  7. Write a query to display all the employees that have the same JOB as SMITH and have salaries greater than 1000. (use subquery)
  8.  

EMPNO EMPNO 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 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 ENAME ENAME CLERK SALESMAN SALESMAN MANAGER SALESMAN MANAGER MANAGER ANALYST PRESIDENT SALESMAN CLERK CLERK ANALYST CLERK CLERK SALESMAN SALESMAN MANAGER SALESMAN MANAGER MANAGER ANALYST PRESIDENT SALESMAN CLERK CLERK ANALYST CLERK JOB JOB MGR MGR 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 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 HIREDATE HIREDATE SAL SAL 800 1600 1250 2975 1250 2850 2450 3000 5000 1500 1100 950 3000 1300 800 1600 1250 2975 1250 2850 2450 3000 5000 1500 1100 950 3000 1300 COMM COMM 300 500 1400 300 500 1400 DEPTNO DEPTNO 20 30 30 20 30 30 10 20 10 30 20 30 20 10 20 30 30 20 30 30 10 20 10 30 20 30 20 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To answer your database queries Ill assume you have an Employees table with columns like employeeid ... 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

Managerial Accounting

Authors: Ray Garrison, Eric Noreen, Peter Brewer

16th edition

1259307417, 978-1260153132, 1260153134, 978-1259307416

More Books

Students also viewed these Databases questions

Question

How do direct labor costs flow through a job-order costing system?

Answered: 1 week ago

Question

explain the different models of exercise behavior,

Answered: 1 week ago

Question

describe the determinants of exercise adherence,

Answered: 1 week ago

Question

discuss the runners high; and

Answered: 1 week ago