Dispatch Calendar
Part of the SQL Foundations section of Coddy's PostgreSQL journey. Lesson 10 of 22.
Challenge
MediumFor orders dated before 2025-02-03, return id, order_month and dispatch_date. order_month is the first day of the order month; dispatch_date is three days after the order. Return dates, ordered by id.
The input tables are shown in the test panel. Each run starts from fresh data. Return the named columns in the stated order; do not hard-code the displayed rows.
Try it yourself
-- Write your SQL here.
All lessons in SQL Foundations
2Dates and Time
Read Dates ExplicitlyDays and IntervalsExtract Calendar PartsMonth BucketsDispatch CalendarPractice on your own: PostgreSQL playground