I have one question in SQL.
This is the query.
SELECT Customer,
SUM(IF(date_format(OutputDate, '%Y') = 2020 AND date_format(OutputDate, '%m') = 3, SupplyPrice, 0)) AS March
FROM (SELECT Customer, OutputDate, SupplyPrice FROM `TableOutput`) AS C
GROUP BY Customer
ORDER BY March DESC
LIMIT 20;
it makes a result below:
Customer March
A 100
B 200
C 300
D 400
...
but I wanna make Customer A and B sum together as A(not B) or new name(e.g. Z)
like this:
Customer March
A(or Z) 300
C 300
D 400
...
I want to modify the query and output it.