How to join sparse events for individual users on a "filled in" date ranges in Redshift?
Non-optimized solution:

WITH RECURSIVE
cte1 AS ( SELECT MIN(created_at) "date" 
          FROM test
          UNION ALL
          SELECT ("date" + INTERVAL '1 DAY')::DATE 
          FROM cte1 
          WHERE "date" &lt; ( SELECT MAX(created_at)
                           FROM test ) ),
cte2 AS ( SELECT DISTINCT account_id
          FROM test ),
cte3 AS ( SELECT cte1."date", cte2.account_id, MAX(test.created_at) created_at
          FROM cte1
          CROSS JOIN cte2
          LEFT JOIN test ON cte1."date" &gt;= test.created_at
                        AND cte2.account_id = test.account_id
          GROUP BY cte1."date", cte2.account_id )
SELECT cte3."date", cte3.account_id "user", test.plan_name
FROM cte3 
LEFT JOIN test ON cte3.account_id = test.account_id
              AND cte3.created_at = test.created_at
ORDER BY 2, 1


fiddle