UNPIVOT can be applied to tables, sub-queries, and common table expressions (CTEs). UNPIVOT cannot be applied to any JOIN expressions, recursive CTEs, PIVOT , or UNPIVOT expressions. Also not supported are SUPER unnested expressions and Redshift Spectrum nested tables.
Does MySQL support PIVOT function?
Unfortunately, MySQL does not have PIVOT function, so in order to rotate data from rows into columns you will have to use a CASE expression along with an aggregate function.18 ene 2015