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

0

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
Window functions
ROW_NUMBER deduplication
Conditional aggregation
Metric definitions
NULL-safe division
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 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 Problems
Sample 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
  1. Rank attempts per (candidate_id, role, day) by started_at DESC and keep rn = 1. 2. Group by day and role. 3. Use CASE sums for completed and errors. 4. Divide with NULLIF so a day with on...

Submit Your Answer
Markdown supported

Related Questions