Show me the outcome count for each organisation.
select count(*) from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.organisation_id;
Which organisation has the least number of outcome? Show ids.
select t1.organisation_id from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.organisation_id order by count(*) asc limit 1;
How about the one with the most outcome count? Show the count as well.
select t1.organisation_id, count(*) from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.organisation_id order by count(*) desc limit 1;