Step-by-Step Conversion in the Facebook Fundraiser Donation Funnel
Last updated: November 29, 2026
Quick Overview
Given an events table logging fundraiser page views, donate-button taps, payment form opens and completed donations, return the number of distinct users at each step and the conversion rate from the previous step for last week.
Meta
November 29, 20260
0
0 solved
Given an events table logging fundraiser page views, donate-button taps, payment form opens and completed donations, return the number of distinct users at each step and the conversion rate from the previous step for last week.
A warm-up SQL question in Meta's data science technical screen, framed around Facebook Fundraisers. The interviewer checks that you can turn raw event logs into a clean funnel with distinct-user counts and correct step-over-step rates without overthinking it.
What the Interviewer Expects
- Counts distinct users, not events, at each step
- Uses conditional aggregation in a single pass over the table
- Computes step-over-step and top-of-funnel conversion with safe division
- Filters the date range before aggregating
- States the assumption about whether later steps require earlier ones
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- How would you require users to complete steps in order?
- How would you break the funnel down by entry surface (Feed, Groups, Messenger share)?
- Why might payment form opens exceed donate taps in the logs?
- How would you report this daily without double counting users across days?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
Table fundraiser_events(user_id, fundraiser_id, event_name, event_ts) with event_name in view_page, tap_donate, open_payment, complete_donation. One user can fire each event many times. I ...
Approach
One scan with COUNT(DISTINCT CASE WHEN ...) gives the four user counts. Then I compute rates from those counts in an outer query, using NULLIF so an empty step does not divide by zero. I keep it t...