U moet de FROM
. herstellen clausule, dus je neemt alleen de vaste kosten per maand mee:
FROM sales s CROSS JOIN
(SELECT LAST_DAY(sales_date) as month_ld, SUM(fix_costs) as fix_costs
FROM sales
WHERE country = 'None'
GROUP BY month_ld
) f
ON f.month_ld = LAST_DAY(s.sales_date)