Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

List out some inventory management techniques.

Answered: 1 week ago