← All SQL interview questions

Duplicate support tickets from the same customer

MediumGROUP BYZomatoTarget

Support wants to merge duplicate tickets. A duplicate is the same customer raising the same issue category more than once on the same day.

From support_tickets, return customer_code, issue_category, raised_on and ticket_count for every such duplicated combination.

Sample data

Table: support_tickets

16 row(s) · showing first 8

ticket_idINTcustomer_codeTEXTissue_categoryTEXTraised_onDATE
1CU-11Refund Delay2026-02-10
2CU-11Refund Delay2026-02-10
3CU-11Refund Delay2026-02-12
4CU-12Wrong Item2026-02-10
5CU-13App Crash2026-02-11
6CU-13App Crash2026-02-11
7CU-13App Crash2026-02-11
8CU-14Late Delivery2026-02-11

Practising alone only goes so far — our live cohorts pair SQL depth with dashboards, agentic analytics projects and mock interviews.

Explore the program