Uncategorised Call Percentage
Accenture ☯️ Medium SQL
Beginner Mode

Objective

Write a SQL query to calculate the percentage of calls that cannot be categorised.

Table Schema:

  • callers
Column Type Description
policy_holder_id INTEGER ID of the caller
case_id VARCHAR Unique case identifier
call_category VARCHAR Category of the call (e.g., 'billing', 'claims', 'n/a', or NULL)
call_date DATE Date of the call
call_duration_secs INTEGER Duration of the call in seconds

Task Requirements:

  • A call is uncategorised if call_category is 'n/a' or NULL
  • Calculate the percentage of uncategorised calls out of all calls
  • Round the result to 1 decimal place

Output columns: uncategorised_pct

Examples

Example 1:

Input:

callers
call_categorycall_datecall_duration_secscase_idpolicy_holder_id
billing2023-01-05300C0011
n/a2023-01-06180C0022
claims2023-01-07420C0033
null2023-01-08250C0044
billing2023-01-09350C0055
n/a2023-01-10190C0066
enrollment2023-01-11510C0077

Output:
uncategorised_pct
42.9
Quick Solution

Code Environment

Sign in or try as guest to run your code.

Sign In

Track

Question Difficulty Company Access
Need more practice in this area? Explore more questions →