Is '2026-03-03 14:00:00' BETWEEN '2026-03-02' AND '2026-03-03'?
expression
result
'2026-03-03 14:00:00' BETWEEN '2026-03-02' AND '2026-03-03'
0
'2026-03-03 14:00:00' < '2026-03-04'
1
As text, these four values sort in this order: '2026-03-02' < '2026-03-03' < '2026-03-03 14:00:00' < '2026-03-04'.
Filter
14:00 on March 3
BETWEEN '2026-03-02' AND '2026-03-03'
outside
>= '2026-03-02' AND < '2026-03-04'
inside
'2026-03-03 14:00:00' sorts after '2026-03-03', so BETWEEN leaves it out, along with every other time on March 3. For an inclusive range of days, use >= the first day and < the day after the last, or compare date(ts).
In the editor, write MARCH_2_AND_3: the visits on two whole days, from a table of timestamps.
Pick an answer above to see the rest
Instructions
1
Write MARCH_2_AND_3: the visits whose timestamp falls on March 2 or March 3, as visit_id, ordered by visit_id.
2
visits.ts holds timestamps like 2026-03-03 14:00:00.