How to convert CTE to normal query?
Issue How can I convert this to normal query? WITH cte AS ( SELECT agentID, SUM(bonus > 0) OVER (PARTITION BY agentID ORDER BY `year` * 12 + `month` RANGE BETWEEN 2 PRECEDING AND CURRENT ROW) flag FROM test ) SELECT agentID FROM cte WHERE flag = 3; I need to convert this because I […]