-
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?
-
- WHERE P1. capacity >= All (select P2. capacity from Cinema P2)
- WHERE P1. capacity >= Any (select P2. capacity from Cinema P2)
- WHERE P1. capacity > All (select max(P2. capacity) form Cinema P2)
- WHERE P1. capacity > Any (select max (P2. capacity) from Cinema P2)
- WHERE P1. capacity >= All (select P2. capacity from Cinema P2)
Correct Option: A
Inner query collects capacities of all the theatres and in outer query we are filtering the tuples with the condition “capacity>=All”. So the theatres which are having maximum capacity will be satisfy the conductivity and they will.