Weekly Self-Service Resolution Rate From Conversation Events

Last updated: November 29, 2026

Quick Overview

Using a conversations table and an events table (answer_served, action_completed, ticket_filed, handoff_agent), compute per tenant and week the share of engaged conversations that were resolved without a ticket or human handoff within 72 hours.

Moveworks
Data Manipulation (SQL/Python)
Data Scientist
Moveworks
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Using a conversations table and an events table (answer_served, action_completed, ticket_filed, handoff_agent), compute per tenant and week the share of engaged conversations that were resolved without a ticket or human handoff within 72 hours.

Resolution and deflection rates are the headline value metrics an enterprise assistant reports to IT leaders, so analysts must define them carefully. The interviewer checks the metric definition (denominator, attribution window, right-censoring) as much as the SQL.

What the Interviewer Expects
  • Defines the denominator as engaged conversations, not all conversations
  • Applies a fixed 72-hour attribution window per conversation
  • Excludes conversations too recent to have a complete window
  • Aggregates to conversation grain before tenant-week grain
  • Guards division by zero
Key Topics to Cover
Conditional aggregation
Attribution windows
Right censoring
Metric definition
Window of maturity
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 attribute a ticket filed by the same employee about the same topic in a new conversation?
  • How would you show this metric with a confidence interval for small tenants?
  • Product wants to count thumbs-up feedback as resolution; what are the risks?
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

conversations(conversation_id, tenant_id, employee_id, started_at) and events(conversation_id, event_type, ts). One conversation can have many events. Engaged = the assistant served an answer or c...

Approach

First collapse events to one row per conversation with two flags using MAX(CASE ...). Then group by tenant and week. Only include conversations at least 72 hours old, otherwise the most recent week ...


Submit Your Answer
Markdown supported

Related Questions