Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DEPARTMENTS Name DEPT ID EMPLOYEES Name EMP ID FIRST NAME LAST NAME JOB SALARY DEPT ID Null? NOT NULL NUMBER(4) Null? T VARCHAR2(10) DEPT NAME

image text in transcribed

DEPARTMENTS Name DEPT ID EMPLOYEES Name EMP ID FIRST NAME LAST NAME JOB SALARY DEPT ID Null? NOT NULL NUMBER(4) Null? T VARCHAR2(10) DEPT NAME VARCHAR2(10) DEPT LOC ID VARCHAR2(9 NUMBER(2) VARCHAR2(20 NUMBER NOT NULL NUMBER NUMBER(2 I Provide SQL query code for the following three questions based on the provided schemas 1. 2. 3. List the records for employees who have top salary and bottom salary for each department sorted based on department id and salary amount List the records for employees who have salary higher than their individual departments average salary List the 2nd highest salary for each department and the salary is higher than the average salary of the department

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

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago

Question

1. Identify the sources for this conflict.

Answered: 1 week ago