You are given user signup data and downstream product events from Quora. Write a PostgreSQL query that produces a funnel by signup date for users who signed up in January 2024. Treat a user as activated if they perform at least one follow_topic, upvote, or ask_question event within 7 days after signup, inclusive of the signup day. Return, for each signup date, the number of signed-up users, the number who completed onboarding, the number who activated, and the onboarding and activation rates as percentages of signups.
Use the event log rather than assuming onboarding or activation from a status field, and make sure each user is counted at most once per stage.