Q. 19 A relational schema for a train reservation database is given below.
Passenger (pid, pname, age) Reservation (pid, class, tid)
What pids are returned by the following SQL query for the above instance of the tables?
SLECT pid FROM Reservation , WHERE class ‘AC’ AND EXISTS (SELECT * FROM Passenger WHERE age > 65 AND Passenger. pid = Reservation.pid)
(A) 1,0
(B) 1, 2
(C) 1, 3
(D) 1, 5
Answer: (c)
Explanation: