USE PNR_Trigger;

UPDATE Alternatefare.Fare_Details FD INNER JOIN 
(SELECT PNR, Timestamp, DATE_ADD(Timestamp, INTERVAL 4 MINUTE) as paddate FROM PNR_Trigger.PNR_Ticket_Details WHERE PNR IN (SELECT PNR FROM meta.toShow WHERE toShow = 0) and Customer = 'Viacom' AND DATE(`Timestamp`) = CURDATE() GROUP BY PNR ) A
ON (FD.PNR = A.PNR and (DATE(FD.Timestamp) = DATE(A.Timestamp) ))
SET FD.Timestamp = A.paddate ;



