Count qualifying support tickets

A support team's tickets table contains the following complete data. attempts counts contact attempts, and resolved is 1 for resolved tickets and 0 otherwise.


ticket_id

priority

attempts

resolved

801

high

1

0

802

high

4

1

803

normal

4

0

804

normal

2

0

805

normal

3

0

806

normal

1

0


SQL
SELECT ticket_id
FROM tickets
WHERE resolved = 0
  AND (priority = 'high' OR attempts >= 3);


How many rows does this query return? Answer as an integer row count, to zero decimal places.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Single Table Queries Questions: