On this page
Kater SQL Functions Date conditions
KATER__IS_BEFORE
True where the date is before the value.
Family: Date conditions
Syntax
KATER__IS_BEFORE(field, value)Arguments
| Argument | Description |
|---|---|
field | The date or timestamp to test. |
value | The value to compare with. A value, or a parameter a reader supplies. |
Returns
TRUE or FALSE. It is NULL where the field is empty, so a filter leaves that row out.
Usage notes
- On a timestamp, a date value is midnight at the start of that day.
Example
This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.
SELECT orders.order_month AS "Order Month", EVAL(orders.count_distinct__order_id) AS "Orders"FROM kater_dataset.orders AS ordersWHERE KATER__IS_BEFORE(orders.order_date, DATE '2025-04-01')GROUP BY orders.order_monthORDER BY 1| Order Month | Orders |
|---|---|
| 2025-01-01 | 141 |
| 2025-02-01 | 155 |
| 2025-03-01 | 133 |
Compiles to
The call compiles to the same SQL on DuckDB and on Snowflake.
orders.order_date < CAST('2025-04-01' AS DATE)