How do I filter rows between 2025-02-01 and 2025-02-28 with SQL?
SELECT * FROM data
WHERE order_date BETWEEN '2025-02-01' AND '2025-02-28'
ORDER BY order_date;
Run this query in QueryLocal →
With dates stored as `YYYY-MM-DD` text, `BETWEEN '2025-02-01' AND '2025-02-28'` 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).