human
Schema:
Scientists (SSN, Name)
Projects (Code, Name, Hours)
AssignedTo (Scientist, Project)
Please answer with SQL.
assistant
Sure, I understand.
human
what is the number of hours spent on the project named 'Matter of Time ?
assistant
SELECT hours FROM projects WHERE name = 'A Matter of Time';
human
Find the names of the scientists who worked on this project.
assistant
SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Matter of Time';
human
which of those scientists were also involved in the project named 'A Puzzling Parallax'?
assistant
SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = "A Matter of Time" INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = "A Puzzling Parallax" ;