The SQL you'd write on paper. Now actually works.
Window functions, correlated subqueries, aggregate over expression, CASE WHEN, predicate pushdown, EXPLAIN ANALYZE - the SQL surface customers asked for in demos, now shipped.
We shipped what customers asked us in demos.
Every construct in the table above came from a real demo where someone asked "can you do X?" and the honest answer used to be no. We shipped the ones the substrate could express with predicate pushdown - semi-joins instead of cursors, expression-aware aggregates instead of subqueries, correlated EXISTS and IN that route through the same index walker as the outer WHERE.
Window functions landed in the same slice. ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, and the SUM / AVG / COUNT / MIN / MAX cumulative aggregates all run as a streaming partition walk on top of the index scan - no extra storage, no spool. Explicit frame clauses are the one piece we still refuse rather than silently approximate.
SELECT
user_id,
amount,
ROW_NUMBER() OVER (
PARTITION BY user_id
ORDER BY ts DESC
) AS rn
FROM payments; Streaming partition walk on the index scan. No spool, no extra storage.
SELECT id, name
FROM customers c
WHERE EXISTS (
SELECT 1 FROM orders o
WHERE o.customer_id = c.id
AND o.status = 'open'
); Rewritten as a semi-join. No row materialisation for the subquery.
SELECT id,
CASE
WHEN balance > 10000 THEN 'high'
WHEN balance > 1000 THEN 'mid'
ELSE 'low'
END AS tier
FROM customers; Branch-free expression in the planner. Pushes down with the rest of the WHERE.
SELECT
customer_id,
SUM(qty * price) AS revenue
FROM line_items
GROUP BY customer_id
HAVING SUM(qty * price) > 1000; Aggregate wraps any expression - not just bare columns.
EXPLAIN tells you which predicate uses which index.
The planner walks the WHERE clause, splits conjuncts, and routes each one to the secondary index that can satisfy it cheapest. EXPLAIN ANALYZE shows estimated vs actual rows per node so drift is visible.
- indexed point lookup < 5 ms
- GROUP BY on 10k rows < 50 ms
- correlated EXISTS over 100k < 80 ms