Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Marks APPENDIX: SCOTT DATABASE - TABLES AND DATA EMP1 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 7369 SMITH CLERK 7902 17/DEC/80 875.77 20 7499

image text in transcribed
image text in transcribed
image text in transcribed
Marks APPENDIX: SCOTT DATABASE - TABLES AND DATA EMP1 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 7369 SMITH CLERK 7902 17/DEC/80 875.77 20 7499 ALLEN SALESMAN 7698 20/FEB/81 1600 30 300 7521 WARD SALESMAN 7698 22/FEB/81 1250 30 500 MANAGER 7566 JONES 7839 02/APR/81 2975 20 7654 MARTIN SALESMAN 7698 28/SEP/81 1250 1400 30 7698 BLAKE MANAGER 30 7839 01/MAY/81 2850 MANAGER 7782 CLARK 7839 09/JUN/81 2450 10 7788 SCOTT ANALYST 7566 09/DEC/82 3000 20 7839 KING PRESIDENT 17/NOV/81 5000 10 7844 TURNER SALESMAN 7698 08/SEP/81 1500 77 30 7876 ADAMS CLERK 7788 12/JAN/83 1100 20 7900 JAMES CLERK 7698 03/DEC/81 950 30 7900 JAMES CLERK 7698 03/DEC/81 950 30 7902 FORD ANALYST 7566 03/DEC/81 3000 20 7934 MILLER CLERK 7782 23/JAN/82 1300 10 DEPT1 DEPTNO, DNAME LOC 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON 1. Display full details for all employees in department 20 2. Display the name and salary of employees who earn more than $2500 and work in "DALLAS'. Label the columns Name and Monthly Salary. 3. Display the employee number and name for all employees who earn more than the average salary. 4. Display full details for all employees where (1) the employee name contains an 'R'anywhere or begins with a 'M' and (2) department number is either 10 or 30. Order the output by employee name in descending order. 5. Display the employee number, employee name, department number and salary for all employees who earns highest average salary in their own department. Sort the output by salary within department number

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

More Books

Students also viewed these Databases questions