Dynamic In Column is supported in MemSql for PIVOT?
Example:
SELECT “Items Produced” AS “Total Production by Day”, Saturday, Sunday
FROM (
SELECT dayOfWeek, itemsProduced
FROM productionHistory
) AS pvt_subquery
PIVOT (
SUM(itemsProduced)
FOR dayOfWeek
IN (select weekday from WeekDays)
) AS pvt_table;
select weekday from WeekDays being dynamic column supply here.