>_ QueryLocal All recipes
SQL recipe

How do I filter rows between 2025-01-01 and 2025-01-15 with SQL?

SELECT * FROM data
WHERE order_date BETWEEN '2025-01-01' AND '2025-01-15'
ORDER BY order_date;
Run this query in QueryLocal →

With dates stored as `YYYY-MM-DD` text, `BETWEEN '2025-01-01' AND '2025-01-15'` works correctly because that format sorts the same way alphabetically and chronologically — no date parsing needed, just a plain inclusive range check.

A table named data with columns: order_id (integer), customer (text), country (text), category (text), quantity (integer), unit_price (real), order_date (text, YYYY-MM-DD).