Timestamps can include fractions of a second. To cover an entire day, include its midnight with >= and stop just before the next midnight with <. Adding an INTERVAL to a starting date gives the end boundary.
SELECT id FROM deployments
WHERE started_at >= DATE '2026-05-10'
AND started_at < DATE '2026-05-10' + INTERVAL '1 day';Return the id of each run on Sunday 17 May. Use a window starting on that date and ending one day later. Check which side of the boundary runs 216 and 219 fall on.