need to return two sets of data with two different where clauses

SELECT budget_id, 
       SUM(IF(type="allocation", points, 0)) AS allocated,
       SUM(IF(type="issue", points, 0)) AS issued
FROM transactions
GROUP BY budget_id

Leave a Comment