Penso di aver sbagliato un po' nel tuo FK, ma almeno tu hai lo spirito;)
Impostazione dello schema MySQL 5.6 :
Query 1 :
SELECT R.budgetid_fk, SUM(R.quantity), SUM(R.quantity * I.price * COALESCE(CC.amount,1)) come totale, B.budgetid, B.budget_monthDA tb_pro_request R INNER UNISCITI a tb_items I ON R.itemid_fk =I.itemidINNER UNISCITI a tb_budgets B ON R.budgetid_fk =B.budgetid AND B.active ='Y'LEFT UNISCITI a tb_currency_converters CC ON CC.from_currencyid_fk =I.currencyid_fk AND CC.to_currencyid_fk =B.currencyid_fkWHERE R.investmentid_fk ='' AND ( R.approval_status ='P' OR R.approval_status ='A' ) AND DATE_FORMAT(B.budget_month,'%Y-%m') ='2018-03' AND B.departmentid_fk ='DP0003'GRUPPO PER R.budgetid_fk
| budgetid_fk | SOMMA(R.quantità) | totale | budgetid | budget_mese ||----------------|------------------|------------ -------|----------------|--------------||| BU201803000001 | 7 | 575.2840143424692 | BU201803000001 | 01-03-2018 |