GATE CS 2021, set 1 · Question 37 · Databases · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
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:
Π_(empNo)(empAge _((age > age1)) ρ_(empNo1, age1)(empAge))
What does the above expression generate?
- (A) Employee numbers of only those employees whose age is the maximum.
- (B) Employee numbers of only those employees whose age is more than the age of exactly one other employee.
- (C) Employee numbers of all employees whose age is not the minimum.
- (D) Employee numbers of all employees whose age is the minimum.
Answer
Answer (C)
Answer from the official GATE CS 2021 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes