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.

1.Display the name of all the clerks who belong to the Accounting department.

2.Display the name and location of the departments in which the employees earn commission in the descending order of the commission.

3.Calculate the total salary of all the managers of the Sales department.

4.Display the names of salesmen in the Sales department along with the department name and location.

5.Display the employee names along with their managers name.

6.Display the department-wise average salary of the employees.

7.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.

8.Display the employee names, their managers name and the department names for all the employees whose department is located in DALLAS.

9. 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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Name the layers of the meninges, and explain their functions.

Answered: 1 week ago