Ordered Funnel From Prequalification to First Card Activation
Last updated: November 29, 2026
Quick Overview
Given an event log of prequalification starts, prequalified offers, applications, approvals and card activations, count how many applicants reach each step in order, where each step must occur after the previous one and activation must happen within 30 days of the prequalification start.
Capital One
November 29, 20260
0
0 solved
Given an event log of prequalification starts, prequalified offers, applications, approvals and card activations, count how many applicants reach each step in order, where each step must occur after the previous one and activation must happen within 30 days of the prequalification start.
Capital One's prequalification flow lets customers see card offers without a hard credit pull, and product analysts track how many of those visitors end up with an active card. The interviewer is checking that you enforce step ordering, avoid counting out-of-order events, and apply the time window correctly.
What the Interviewer Expects
- Anchors each applicant on the first prequalification start
- Takes the first occurrence of each later step that happens after the prior step
- Applies the 30-day window relative to the funnel start
- Reports counts and step-to-step conversion
- Explains why a simple COUNT DISTINCT per event type overstates the funnel
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 report median time between steps?
- How would you handle applicants who restart prequalification months later?
- How would you build the same funnel for a specific card product like Quicksilver?
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
events(applicant_id, event_type, event_ts)with typesprequal_start,prequal_offer,app_submit,approved,card_activated.- Applicants may apply directly without prequalifying; those sho...
Approach
Chain one CTE per step. Each takes the minimum timestamp of its event type that is at or after the previous step's timestamp for the same applicant. A missing step yields NULL, and NULL propagates so ...