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
Data Manipulation (SQL/Python)
Data Scientist
Thumbtack
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Easy

0

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
LEFT JOIN
Aggregation
Time windows
Funnel metrics
Right censoring
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. 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 Problems
Sample 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
  1. Reduce contacts to one row per request with MIN(contacted_at), which prevents a request with three pros from being counted three times.
  2. LEFT JOIN onto requests, so requests nobody answered...

Submit Your Answer
Markdown supported

Related Questions