The Last Day Is Missing
orders.ordered_at is timestamptz and there is a B-tree index on it. This monthly count is quietly low:
SELECT count(*) FROM orders
WHERE ordered_at BETWEEN '2026-01-01' AND '2026-01-31';
Which replacement is both correct and able to use that index as an access predicate?
Sign in to answer questions and track your progress
Sign In