Weekly Contact Rate by Category From Requests and Contacts
Last updated: November 29, 2026
Quick Overview
Using a requests table and a contacts table, compute for each week and category the share of customer requests that received at least one pro contact within 48 hours of creation.
Thumbtack
November 29, 20260
0
0 solved
Using a requests table and a contacts table, compute for each week and category the share of customer requests that received at least one pro contact within 48 hours of creation.
Marketplace health at Thumbtack is tracked through funnel metrics like whether a customer's request gets a pro response quickly. This SQL screen checks joins that preserve unanswered requests, time-window logic and a clean definition of the denominator.
What the Interviewer Expects
- Asks what counts as a contact and which timestamp defines the week
- Uses a LEFT JOIN so requests with no contact stay in the denominator
- Collapses multiple contacts to the first one before joining to avoid fan-out
- Applies the 48 hour window relative to request creation
- Mentions excluding the most recent incomplete 48 hours
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 also report median time to first contact?
- How would you exclude requests later flagged as spam or duplicates?
- The rate dropped in one category. What would you query next?
- How would you make this a daily rolling 7 day metric?
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
Assume requests(request_id, category, created_at) with one row per customer request and contacts(request_id, pro_id, contacted_at) with one row per pro who contacted or was matched to that request...
Approach
- Reduce
contactsto one row per request withMIN(contacted_at), which prevents a request with three pros from being counted three times. - LEFT JOIN onto
requests, so requests nobody answered...