Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

APPENDIX: SCOTT DATABASE - TABLES AND DATA EMPI SALCOMM DEPTNO 375.77 900 500 12.50 2975 1250 250 1400 EMPNO ENAME JOR 7369 SMITH CLERK 7490

image text in transcribed
APPENDIX: SCOTT DATABASE - TABLES AND DATA EMPI SALCOMM DEPTNO 375.77 900 500 12.50 2975 1250 250 1400 EMPNO ENAME JOR 7369 SMITH CLERK 7490 ALLEN SALESMAN 7521 WARD SALESMAN 7566 PONES MANAGER 7654 MARTIN SALESMAN 7698 BLAKE MANAGER 7782 CLARK MANAGER 7785 SCOTT ANALYST 7839 KING PRESIDENT 7844 TURNER SALESMAN 7876 ADAMS CLERK 7900 JAMES CLERK 7902 FORD ANALYST 2934 MILLER CLERK MGR HIREDATE 7902 17 TECNO 7698 20 FEB SI 7698 22 FERS 7839 02 APR 183 7695 28 SEP 7839 01 MAYI 7839 09 JUNE 7566 09 DECISO 17 NOV81 7698 OG SEP 7768 12/JANS 769803 DECKI 7566 03 DECK 776223AN 222222 9 5000 10 1500 77 1100 36 90 30 1000 1300 10 DEPTI DEPTNO LOC DNAME 10 ACCOUNTING 20 RESEARCH 30 SALES 40 OPERATIONS NEW YORK DALLAS CHICAGO BOSTON Write SQL queries to solve the following specifications. 1. Display full details for all employees in department 20 2. Display the name and salary of employees who cam 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 carn more than the average salary ***** BURGO 4. Display full details for all employees where (1) the employee name contains an *** anywhere or begins with a "M' and (2) department number is either 10 or 30. Onder the output by employee name in descending order. 5. Display the employee number, employee name, department number and salary for all employees who carns 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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

4. What actions should Bouleau & Huntley take now?

Answered: 1 week ago