When did Linda Smith visit Subway?
SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway";
Linda Smith refers to Student.Fname = 'Linda' AND Student.Lname = 'Smith'; visit Subway refers to Restaurant.ResName = 'Subway'; when did visit refers to selecting TIME; joining tables to correlate students with their restaurant visits.