Skip to content

Weekly ticket volume, weeks starting Monday

EasyFreeDates and time6 min2 hidden datasets

The task

The support lead reports ticket volume per week for March 2025.

Count the tickets created from 2025-03-01 00:00:00 up to and including the whole of 2025-03-31. Group them by the week they were created in, where a week starts on Monday.

Return:

  • week_start: the Monday that starts the week, as a date. The first week starts on 2025-02-24, because 2025-03-01 is a Saturday. Only March tickets are counted, so that week is partial.
  • tickets: how many March tickets were created in that week

Weeks with no March tickets are not listed. Sort by week_start.

Expected output

week_starttickets
  • Sorted by week_start ascending.
  • Checked on the sample and on 2 hidden datasets. How grading works

Tables Customer support desk · click a name to insert it

agents14 rows in the sample

Support agents. Key: agent_id.

intUnique id.
textName.
textbilling, technical or general.
dateStart day.
tickets900 rows in the sample

One row per ticket. Key: ticket_id.

intUnique id.
intWho opened it.
intAssigned agent. NULL if never assigned.
textemail, chat or phone.
textlow, normal, high or urgent.
textbilling, bug, how_to or account.
timestampOpened (UTC).
timestampFirst reply from an agent. NULL if none yet.
timestampClosed as solved. NULL while open.
satisfaction366 rows in the sample

Survey answers, at most one per ticket. Key: ticket_id.

intThe ticket.
int1 (very unhappy) to 5 (very happy).
timestampWhen answered (UTC).

Related questions

Loading the editor and PostgreSQL