Show me the id of organizations involved in less then 3000$ grant amount.
select t2.organisation_id from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) < 3000;
How about those with a total of more than 6000$ grants?
select t2.organisation_id from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) > 6000;
List their description as well.
select t2.organisation_id, t2.organisation_details from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) > 6000;