Back to problems

Write SQL for call analytics — Q 1

SQL · Meta · Easy

Assume the call records are stored in a table called calls. Every row represents one call and includes a call_type label plus a boolean picked_up column that is true exactly when the call was answered. Write a SQL query that groups the rows by call_type. For each distinct call_type, compute the total number of calls and the number of calls that were picked up. The result must contain one row per call_type with the column names call_type, total_calls, and picked_up_calls. The…

Checking your access…