Microsoft-style Company ChallengeEasyVerified answerSQLite live

Closed Support Tickets

Which support tickets have been resolved and marked as Closed?

  • Filtering
  • Sorting

Challenge brief

Understand the request

Support Quality wants to verify resolution performance and needs a list of all tickets that have been successfully closed.

List all ticket_ids where status = 'Closed'.

Return

  • ticket_id

Constraints

  • Return tickets whose status is 'Closed'
  • Order by ticket ID

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

All ticket data is in support_tickets. Filter status to 'Closed'. No JOIN needed — just the ticket_id.

Hint 2

SELECT ticket_id FROM support_tickets WHERE status = 'Closed'.

Hint 3

Build question 8 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 ticket_id FROM support_tickets WHERE status = 'Closed' ORDER BY ticket_id;

Why this works

7 of 12 tickets are Closed. The remaining 5 (ticket_ids 2, 4, 7, 9, 11) are Open. status = 'Closed' is a simple equality filter — note the capital C.

Success check

7 closed tickets — ticket_ids 1, 3, 5, 6, 8, 10, 12

Expected result

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

ticket_id
1
3
5
6
8
10
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.