GATE CS 2015 · Set-3 · SQL Queries

MCQ · 1 mark · Problem DBMS-SQL-0086

Consider the following relation
Cinema(theater, address, capacity)
Which of the following options will be needed at the end of the SQL query SELECT P1.address FROM Cinema P1 such that it always finds the addresses of theaters with maximum capacity?
  1. A
    WHERE P1.capacity \(\geq\) All (select P2.capacity from Cinema P2)
  2. B
    WHERE P1.capacity \(\geq\) Any (select P2.capacity from Cinema P2)
  3. C
    WHERE P1.capacity \(\gt\) All (select max(P2.capacity) from Cinema P2)
  4. D
    WHERE P1.capacity \(\gt\) Any (select max(P2.capacity) from Cinema P2)

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

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/8396/gate2015-3-19

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