Активность вести себя как итог

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
0
задан Abhishek Shankhadhar 5 March 2019 в 03:01
поделиться