What are the number of project outcomes each project staff involved in?
select count(*) from staff_roles as t1 join project_staff as t2 on t1.role_code = t2.role_code join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.staff_id;
Who is involved in the most number of project outcomes? Show ids.
select t2.staff_id from staff_roles as t1 join project_staff as t2 on t1.role_code = t2.role_code join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.staff_id order by count(*) desc limit 1;
Give me the person's role description.
select t1.role_description, t2.staff_id from staff_roles as t1 join project_staff as t2 on t1.role_code = t2.role_code join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.staff_id order by count(*) desc limit 1;