Daily AI Interview Completion Rate by Role in SQL
Last updated: November 29, 2026
Quick Overview
From an interviews table with one row per attempt, compute for each day and role the number of candidates who started, completed, and the completion rate, counting only each candidate's last attempt per role per day and excluding technical errors from the denominator.
Micro1
November 29, 20260
0
0 solved
From an interviews table with one row per attempt, compute for each day and role the number of candidates who started, completed, and the completion rate, counting only each candidate's last attempt per role per day and excluding technical errors from the denominator.
micro1 runs a high volume of spoken AI interviews, and completion rate is a core health metric for both the candidate experience and the voice stack. The interviewer checks that you deduplicate retries and keep platform failures from being blamed on candidates.
What the Interviewer Expects
- Asks how retries are recorded before writing SQL
- Deduplicates with a window function rather than DISTINCT
- Separates candidate abandonment from technical errors
- Protects the division with NULLIF
- Groups on a date, not a timestamp
- Sanity checks totals against the raw table
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 the rate in the candidate's local time zone instead of UTC?
- How would you flag a day where the technical error rate spikes compared with the trailing week?
- Should a candidate who retried and completed count as an abandonment on the first attempt for a voice-quality dashboard?
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
Table interviews(interview_id, candidate_id, role, started_at, status) where status is completed, abandoned or technical_error. A candidate can retry the same role on the same day, and I want ...
Approach
- Rank attempts per
(candidate_id, role, day)bystarted_at DESCand keeprn = 1. 2. Group by day and role. 3. UseCASEsums for completed and errors. 4. Divide withNULLIFso a day with on...