Loading...
Search Success by User Tenure
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- mid, senior
Problem
We want to compare search quality between new and existing users. A successful search is one where a click occurred within 30 seconds of the query time. Classify users as 'new' (signup date within the last 30 days of the dataset) or 'existing'. Return one row per segment with total searches, successful searches, and success rate.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.