MySQL Forums
Forum List  »  General

Querty for Pivoting
Posted by: Abhishek Kumar
Date: September 23, 2020 11:52PM

I am trying to achieve a pivot dashboard for a product which is build on mysql.
I have a table by name payment, which has close to 50 fields and 5000 rows.
The fields of interest here are revenue_type, amount, created_at (this is in dd/mm/yyyy format).
The query should group the distinct revenue_type in first column and months ( first row and not dates). Now the intersection between this column and row should tell the amount. So the pivot will tell which revenue type has earned what amount in different months.

Options: ReplyQuote


Subject
Written By
Posted
Querty for Pivoting
September 23, 2020 11:52PM
September 24, 2020 09:30AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.