Computer Science, asked by shivamtiwari552275, 2 months ago

Solve this query in relational algebra.

The Relations are:

EMP( EnameSSNo, Sal,Deptno)

Dept (Deptno, Dname, Dloc)

Retrieve each employee name, department name having salary greater than 500.

Answers

Answered by anchaldwivedi53
1

Explanation:

Dept (Deptno, Dname, Dloc)

Answered by Jasleen0599
1

The Relations are:

EMP( EnameSSNo, Sal,Deptno)

Dept (Deptno, Dname, Dloc)

QUERY

SELECT * FROM employees

WHERE salary >

ALL(SELECT avg(salary)FROM employees GROUP BY department_id);

  • In SQL, the > operator can be used to check whether an expression is greater than. In this case, the customer id must be bigger than 6000 for the SELECT operation to retrieve all data from the customers table. The result set would not contain a customer id of 6000.
  • A SQL SELECT query must only return rows whose aggregate values satisfy the requirements, according to the HAVING clause.
  • In SQL Server, the > operator can be used to check whether an expression is greater than. In this example, the SELECT statement would retrieve all rows from the workers table where the employee id is larger than 3000. SELECT * FROM employees WHERE employee id > 3000;

#SPJ2

Similar questions