Create a view payment_pivot with one row per month ('YYYY-MM') and order counts in columns upi, card and cod.
payment_pivot
month
upi
card
cod
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.