Question
EMPLOYEE TABLE (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO) DEPT (DEPTNO, DNAME, LOC) Write the Relational Algebra Expressions for the following DML queries for
EMPLOYEE TABLE (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
DEPT (DEPTNO, DNAME, LOC)
Write the Relational Algebra Expressions for the following DML queries for the above two tables.
Display the name of all the clerks who belong to the Accounting department.
Display the name and location of the departments in which the employees earn commission in the descending order of the commission.
Calculate the total salary of all the managers of the Sales department.
Display the names of salesmen in the Sales department along with the department name and location.
Display the employee names along with their managers name.
Display the department-wise average salary of the employees.
Display the department name and the number of employees in each department for those departments which have more than 5 employees working in them.
Draw the Query Tree for the following queries.
Display the employee names, their managers name and the department names for all the employees whose department is located in DALLAS.
Display the number of job-tiles in each department arranged in ascending order of the job-tiles [Hint: You have to use DISTINCT, GROUP BY and ORDER BY].
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