I have a problem, maybe something simple, but it still does not work out.
This is the result to obtain
SELECT month(sale_date) as mes, SUM(subtotal) as Totalizado FROM sales WHERE YEAR(sale_date) = '2018' GROUP BY 1 order by 1
This brings me the totalized total of my sales, in sales I have a column status (PAID, MUST or CANCELED), I would list next to the columns as in the image, try to do it with case or if but I did not have success.
Thanks in advance. Greetings.