human
Schema:
Scientists (SSN, Name)
Projects (Code, Name, Hours)
AssignedTo (Scientist, Project)
Please answer with SQL.
assistant
Sure, I understand.
human
Find the number of scientists involved for the projects that require more than 300 hours
assistant
SELECT COUNT( distinct Scientist ) FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300;
human
Find the number of scientists involved for the projects that require less than 300 hours
assistant
SELECT COUNT( distinct Scientist ) FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours < 300;
human
and what are the names of the projects requiring more than 300 hours
assistant
SELECT name FROM projects WHERE hours > 300 ;