Leetcode 1179 - Reformat Department Table
Reformat Department Table https://leetcode.com/problems/reformat-department-table/ SELECT id, SUM(CASE WHEN month='Jan' THEN revenue ELSE NULL END) AS JAN_Revenue, SUM(CASE WHEN month='Feb' THEN revenue ELSE NULL END) AS Feb_Revenue, SUM(CASE WHEN month='Mar' THEN revenue ELSE NULL END) AS Mar_Revenue, SUM(CASE WHEN month='Apr' THEN revenue ELSE NULL END) AS Apr_Revenue, SUM(CASE WHEN month='May..