Database-Management-System
May 4, 2024Question 4248 – Data-Interpretation
May 4, 2024Question 8403 – SQL
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?
Correct Answer: A
Question 41 Explanation:
Inner query collects capacities of all the theaters and in outer query we are filtering the tuples with the condition “capacity >= All”.
So the theaters which are having maximum capacity will satisfy the condition.
So the theaters which are having maximum capacity will satisfy the condition.
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) from Cinema P2)
WHERE P1.capacity > Any (select max(P2.capacity) from Cinema P2)
Subscribe
Login
0 Comments