Top 10 Call Topics
The ten most common call topics.
The ten most common call topics in the call centre topic data.
This is useful for quickly identifying the most common reasons people contact the call centre.
Calculation
Count records by cleaned topic, calculate topic share, and return the top 10 by topic count.
NoteExample queries
WITH topic_counts AS (
SELECT
REGEXP_REPLACE(TRIM(statobject), '\s+', ' ') AS call_topic,
COUNT(*) AS topic_count
FROM call_centre.weekly_topic_dump
GROUP BY REGEXP_REPLACE(TRIM(statobject), '\s+', ' ')
),
topic_shares AS (
SELECT
call_topic,
topic_count,
CAST(topic_count AS DOUBLE)
/ NULLIF(SUM(topic_count) OVER (), 0) AS topic_share
FROM topic_counts
)
SELECT
call_topic,
topic_count,
topic_share
FROM topic_shares
-- sort on topic_count desc, then call_topic asc to break ties deterministically
ORDER BY topic_count DESC, call_topic
LIMIT 10;tbl(con, in_schema("call_centre", "weekly_topic_dump")) |>
mutate(
call_topic = str_squish(statobject)
) |>
count(call_topic, name = "topic_count") |>
mutate(
topic_share = as.double(topic_count) / sum(topic_count, na.rm = TRUE)
) |>
# sort on topic_count desc, then call_topic asc to break ties deterministically
arrange(desc(topic_count), call_topic) |>
head(10)Interpretation notes
The top 10 view is useful for quick reporting but may hide important lower-volume issues. In cases where there are not many calls, it may be useful to limit this list to a top 5, or to truncate ties at the end of the list.
This is a share of topic records, not of callers. A call can carry several topics, so a call counts once per topic here. For the share of callers who asked about a topic, see Calls by Topic Category.
Alternative names
- top 10 call reasons
- most common call topics
- top contact drivers
- main reasons for calling
- top caller issues