Using activity over last few days to label user as "active"
That may not be the most elegant solution, but it works:
with activity_cte (day, user_id, act1, act2) as (
    values
        ('2020-01-01'::date, 1, 0, 1),
        ('2020-01-01'::date, 3, 1, 0),
        ('2020-01-02'::date, 1, 3, 2),
        ('2020-01-02'::date, 2, 0, 2),
        ('2020-01-02'::date, 5, 0, 1),
        ('2020-01-03'::date, 1, 1, 2),
        ('2020-01-03'::date, 5, 1, 1),
        ('2020-01-04'::date, 2, 1, 1),
        ('2020-01-04'::date, 5, 4, 0)
),
day_users AS (
    SELECT DISTINCT
           day,
           array_agg(user_id)
               OVER (ORDER BY day
                     RANGE BETWEEN INTERVAL '1 day' PRECEDING AND CURRENT ROW) AS users
    FROM activity_cte
)
SELECT day_users.day,
       count(DISTINCT user_id)
FROM day_users
    CROSS JOIN LATERAL unnest(users) AS u(user_id)
GROUP BY day_users.day;

    day     | count 
------------+-------
 2020-01-01 |     2
 2020-01-02 |     4
 2020-01-03 |     3
 2020-01-04 |     3
(4 rows)