how many scientists are in the table?
select count(*) from scientists
how many of them are assigned to a project?
select count(distinct scientist) from assignedto
among them, how many are involved for the projects that require less than 1000 hours. List project names.
select count(*), t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project where t1.hours < 1000 group by t1.name
how about for the projects that require more than 300 hours?
select count(*), t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project where t1.hours > 300 group by t1.name