For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
index

WITH Keyword

Use with AI:Rippling AI ChatGPT Claude Cursor

Description​

Introduces a Common Table Expression (CTE) for complex queries

Syntax​

WITH cte_name AS (
SELECT ...
)
SELECT ...
FROM cte_name;

Example​

WITH
employee_2025 as (
SELECT
id,
start_date
from
rippling.employee.Employee
where
start_date > DATE(2025, 01, 01)
)
SELECT
e.id,
e.full_name,
employee_2025.start_date
FROM
rippling.employee.Employee e
JOIN employee_2025 USING (id);