GATE CS 2021 · Set-1 · SQL Queries

MCQ · 2 marks · Problem DBMS-SQL-0058

The following relation records the age of 500 employees of a company, where empNo ( indicating the employee number) is the key:\(empAge(\underline{empNo},age)\)Consider the following relational algebra expression:\(\Pi_{empNo}(empAge \Join_{(age > age1)} \rho_{empNo1,age1}(empAge))\)What does the above expression generate?
  1. A
    Employee numbers of only those employees whose age is the maximum
  2. B
    Employee numbers of only those employees whose age is more than the age of exactly one other employee
  3. C
    Employee numbers of all employees whose age is not the minimum
  4. D
    Employee numbers of all employees whose age is the minimum

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionOfficial GATE Answer Key: Option C.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/357424/gate-cse-2021-set-1-question-27

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com