ClickHouse Window Functions in TypeScript
How to use row_number(), rank(), dense_rank(), and lagInFrame() in ClickHouse, and how to run window functions from a type-safe TypeScript query builder with hypequery.
Insights
Deep dives, architecture notes, and product guidance from the hypequery team.
How to use row_number(), rank(), dense_rank(), and lagInFrame() in ClickHouse, and how to run window functions from a type-safe TypeScript query builder with hypequery.
A semantic layer is a shared definition of your metrics — what 'revenue' means, exactly, everywhere it appears. Here's what that looks like in practice, the forms it takes, and how ClickHouse + TypeScript teams implement one in code.
How to write GROUP BY queries against ClickHouse from TypeScript: sum, avg, count, countDistinct, quantile, argMax, WITH TOTALS, HAVING, and time bucketing — all with typed results.
dbt and TypeScript solve overlapping but different problems on top of ClickHouse. Here's how to think about which one belongs in your stack — and when you need both.
A practical guide to building multi-tenant embedded analytics on ClickHouse with typed TypeScript query layers, row-policy isolation, projections, quotas, and operational patterns that scale.
ARRAY JOIN flattens array columns into individual rows. Here's how it works, when to use it, and how to write it in TypeScript with hypequery.
ClickHouse uses HTTP, not TCP — so connection pooling works differently than with Postgres or MySQL. Here's the right approach for Node.js.
Practical guide to ClickHouse date bucketing functions in TypeScript — toStartOfDay, toStartOfWeek, toStartOfMonth, toStartOfQuarter, and toStartOfInterval.
Looking for executeTakeFirst in ClickHouse? If you're coming from Kysely, here's how hypequery handles single-row queries and what the equivalent patterns look like.
How to express ClickHouse filters in TypeScript with query_params in @clickhouse/client and typed where-chains in hypequery.