Microsoft-style Company ChallengeBeginnerVerified answerSQLite live

Support Tickets Count

How many support tickets have been raised in total?

  • Aggregation

Challenge brief

Understand the request

Customer Support Operations is reviewing total support workload for the quarter and needs the headline ticket count for the management report.

Return the total count of support tickets as total_tickets.

Return

  • total_tickets

Constraints

  • Return one row containing the complete support-ticket count

Data you will use

Review the relevant tables before deciding how to join, filter, or aggregate them.

support_tickets

  • ticket_idINTEGER
  • user_idINTEGER
  • product_idINTEGER
  • created_dateDATE
  • statusTEXT

Hints, when you need them

Open one clue at a time so you still do the reasoning.

Hint 1

Each row in support_tickets is one ticket. COUNT(*) gives the total — no filter needed.

Hint 2

SELECT COUNT(*) AS total_tickets FROM support_tickets.

Hint 3

Build question 7 from the required result grain: choose the driving table, add only the joins and filters needed for that grain, then apply aggregation and deterministic ordering.

Verified SQL answer

Attempt the problem first, then compare structure and reasoning—not just syntax.

Reveal solution and explanation
SELECT COUNT(*) AS total_tickets FROM support_tickets;

Why this works

12 total tickets — one per user in this dataset. 7 are Closed and 5 are Open. COUNT(*) counts all rows regardless of status.

Success check

1 row — total_tickets: 12

Expected result

Use this output to verify values, aliases, ordering, and row count.

total_tickets
12

Learn the concepts behind this answer

Strengthen your understanding with these targeted learning topics:

Continue practicing

SQL Interview Practice

Return to the complete interview preparation experience.