Skip to main content
On this page

Kater SQL Functions Date grains

KATER__QUARTER

The first day of the quarter the date is in.

Family: Date grains

Syntax

KATER__QUARTER(field)

Arguments

ArgumentDescription
fieldThe date or timestamp.

Returns

A date.

Usage notes

  • On a timestamp, it drops the time of day too. So 14 March 2026 at 09:30 gives 1 January 2026.

Example

This Sandbox query reads the sample shop’s orders. The table shows the rows that Kater gave.

SELECT
orders.order_id AS "Order ID",
orders.order_date AS "Order Date",
DIMENSION('order_date_quarter', KATER__QUARTER(orders.order_date)) AS "Quarter"
FROM kater_dataset.orders AS orders
ORDER BY
1
LIMIT 3
Order IDOrder DateQuarter
O000002025-05-262025-04-01
O000012025-11-282025-10-01
O000022025-07-252025-07-01

Compiles to

The call compiles to the same SQL on DuckDB and on Snowflake.

CAST(DATE_TRUNC('QUARTER', orders.order_date) AS DATE)

See also