What are all of the scientists' names please?
select name from scientists
What are the project names of all of them?
select t1.name, t3.name from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist join projects as t3 on t2.project = t3.code
Can you show the hours they each worked too, please?
select t1.name, t3.name, t3.hours from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist join projects as t3 on t2.project = t3.code order by t3.name, t1.name
Can you please order them in alphabetical order of project, and then of scientist name?
select t1.name, t3.name, t3.hours from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist join projects as t3 on t2.project = t3.code order by t3.name, t1.name
Yes, please.
select avg ( hours ) from projects