Ticket Sell-Through Rate by Event Category Over 90 Days
Last updated: November 29, 2026
Quick Overview
Using tables of listings, sales and events, compute for each event category the share of listed tickets that actually sold, for events that took place in the last 90 days.
StubHub
November 29, 20260
0
0 solved
Using tables of listings, sales and events, compute for each event category the share of listed tickets that actually sold, for events that took place in the last 90 days.
Sell-through tells StubHub where supply is outrunning demand (say, regular-season baseball) and where it is scarce (playoffs, stadium tours). A data science screen uses it to check join discipline: pre-aggregating sales so listings are not double counted, and keeping unsold listings in the denominator.
What the Interviewer Expects
- Asks what one row in each table represents
- Pre-aggregates sales per listing before joining
- Uses a LEFT JOIN so unsold listings still count
- Restricts to events that have already happened
- Guards against division by zero
- Mentions relisted or edited quantities as a data caveat
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 weight sell-through by dollars instead of tickets?
- How would you show sell-through by days remaining before the event?
- A broker lists the same seats twice under two listing ids. How does that bias the metric?
- How would you compare sell-through for listings priced above versus below the section median?
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
listings(listing_id, event_id, seller_id, created_at, quantity, price): one row per listing,quantityis the number originally listed.- `sales(order_id, listing_id, sold_at, quantity, price_per...
Approach
Joining sales straight onto listings repeats the listing row once per order, which would inflate SUM(l.quantity). So aggregate sales to one row per listing first, LEFT JOIN that to listings so z...