Analyze Support Ticket Response Times

Company: IBM India-standard -Data Science

Difficulty: medium

Problem Statement

Analyze Support Ticket Response Times A customer support team wants to analyze how long it takes to resolve tickets, so that it can track performance and improve service quality. Write an SQL query that reports the average response time , in hours, of the tickets that were successfully resolved. A ticket is resolved when its resolved_at field has a value. A ticket whose resolved_at is NULL is still open and must be ignored completely. Table: support_tickets Column Type Constraint Description id INT PRIMARY KEY Unique identifier of the support ticket customer_id INT The customer who created the ticket (one customer may have many tickets) created_at VARCHAR(19) Date and time the ticket was created, as YYYY-MM-DD HH:MM:SS resolved_at VARCHAR(19) Date and time the ticket was resolved, as YYYY-MM-DD HH:MM:SS , or NULL if it is not resolved Expected Output Return exactly one row with one column: Column Description average_response_time The average, over all resolved tickets, of the time betw