runtime
30 / 88

task Date series & missing days · medium

Days with no orders

From 2025-03-01 through 2025-03-14, return each day (column day, YYYY-MM-DD) on which no order was placed, earliest first.

what to return

Columns
day
Rows
7 rows · in the order asked
Watch for
Both boundary days are included.
Any order status counts as an order.
Skill
Find missing dates by building a calendar. Refresher: Ask whether a row exists →

expected result

Your query should return exactly these columns and values. Run it and compare.

expected result7 rows · in this order
day
2025-03-02
2025-03-04
2025-03-07

first 3 of 7 rows

data you can query

Sample rows from each table. Each column shows its type underneath; → marks a link to another table.

sales_orders5 columns · 33 rows
idinteger · keyshopper_idinteger → shoppersorder_datetextstatustextdelivered_datetext
10112025-01-04delivered2025-01-08
10222025-01-06delivered2025-01-07
10312025-01-15delivered2025-01-20
10432025-01-18cancelledNULL
10542025-01-22delivered2025-01-31

showing 5 of 33 rows

solution.sql
 

Hints and the answer are always available. Using them counts the question as solved with help.