GATE 2021 CS – Question 37
The following relation records the age of 500 employees of a company, where empNo (indicating the employee number) is the key: empAge(empNo, age). Consider the following relational algebra expression:
$\Pi_{empNo}(empAge \bowtie_{(age>age1)} \rho_{empNo1,age1}(empAge))$
What does the above expression generate?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) Employee numbers of all employees whose age is not the minimum.
Explanation
The join keeps an employee if some other employee has a strictly smaller age. So it returns everyone whose age is not the minimum.