Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started