A relational schema for a train reservation database is given below.
passenger(pid, pname, age)
reservation(pid, class, tid)
pid0123pnameSachineRahulSouravAnilAge65666769Passengerpid012513classACACSCACSCACtid820082018201820382048202Reservation
What pids are returned by the following SQL query for the above instance of the tables?
SELECT pid
FROM Reservation
WHERE class='AC' AND
EXISTS (SELECT *
FROM Passenger
WHERE age>65 AND
Passenger.pid=Reservation.pid)