GateAI
SQL

GATE CSE 2015 Set 3 · Q3

MCQ1 markEasy

Time

Consider the following relation Cinema(theater, address, capacity) Which of the following options will be needed at the end of the SQL querySELECT P1.address FROM Cinema P1such that it always finds the addresses of theaters with maximum capacity?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) WHERE P1.capacity >= All (select P2.capacity from Cinema P2)

SQL

To find the addresses of the theater(s) having the maximum capacity, we want to select every tuple P1P_1 whose capacity is greater than or equal to the capacity of all tuples P2P_2 in the relation Cinema [1].

  • Option A:WHERE P1.capacity >= All (select P2.capacity from Cinema P2) checks that P1.capacity≥xP_1.\text{capacity} \ge x for every capacity xx in Cinema [1]. This correctly selects the theaters with maximum capacity [1].

  • Option B:>= Any selects any theater whose capacity is greater than or equal to *at least one* theater's capacity (i.e., any capacity ≥\ge minimum capacity) [1].

  • Option C:> All (select max(P2.capacity) ...) searches for a capacity strictly greater than the maximum capacity, which returns an empty result [1].

  • Option D:> Any (select max(P2.capacity) ...) is also strictly greater than the maximum, returning nothing [1].

Thus, (A) is the correct option [1].

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This SQL previous year question is Q3 of the GATE CSE 2015 Set 3 paper. Find more GATE CSE PYQs on SQL in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related SQL PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

SQL in GATE CSE

SQL has 17 GATE CSE PYQs across 14 papers from 2011 to 2025. 6 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2015 Set 3.

How GATE tests SQL

More from GATE CSE 2015 Set 3

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2015 Set 3 · Q3 · MCQ

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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.