I have the following data.
I want to get a pivot result based on merchants as rows and Month, Year, Type as columns and Amount as the agg value.
I know the use of case clause in Mysql but I wish to automate it for the upcoming data and don't want to hard code month, Year and type since I have thousands of "Types" in the real data.
Thanks in advance.