Using our built in date range filter example:
select * from payments where [payments.created_at=daterange];
From the dashboard UI you can update the Date Range filter to generate new queries.

A custom date range is also available in the UI.

When using the date range filter, the query would be modified to something like postgres example:
select * from payments where payments.created_at >= '2022-09-13':: date and payments.created_at < ('2022-10-28':: date + interval '1 day'):: date