Consider the given relational schema:
EMPLOYEE(EmpNo, EmpName, MgrNo, Job, Salary, DeptNo)
DEPARTMENT(DeptNo DeptName, DeptLoc)
Where, MgrNo is one of the EmpNo.
Q1. prepare 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.