Codington
0 of 8 problems solved • 0%

Exercise prompt

Compare Calendar Weeks

In PostgreSQL, date_trunc('week', started_at) returns midnight on the Monday of the run’s week. Cast that value to date to label the group with its Monday.

Your task

Using the entire log, return one row per calendar week with its Monday as week_start (a date) and its number of runs as run_count. List the weeks from earliest to latest.

Opening the database…