Sql definition and queries


Consider the given relational schema:

EMPLOYEE(EmpNo, EmpName, MgrNo, Job, Salary, DeptNo)
DEPARTMENT(DeptNo DeptName, DeptLoc)

Where, MgrNo is one of the EmpNo.

Q1. Write down an SQL DDL definition of this database.

Q2. Describe the given queries in the SQL:

a) Determine the names of the employees whose salary is more than the average salary of their department.
b) Find out the names of employee who are getting the third maximum salary.
c) Find out the names of employees and the names of their managers.
d) Determine the names of departments whose average salary is more than the average salary of all departments.

Q3. Update DeptNo of all employees who are engineers with the DeptNo of department situated at London.

Q4. Delete the employees who have no departments allocated.

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Sql definition and queries
Reference No:- TGS010941

Expected delivery within 24 Hours