A step-by-step migration guide from @clickhouse/client SQL strings and hand-written row interfaces to generated types and a typed builder — incrementally, hot paths first, with honest escape hatches for the SQL you keep.
Ship an internal analytics tool on ClickHouse with three pieces: schema-generated types, a typed query builder, and a Next.js page. No BI platform, no governance layer — until you actually need one.
Build a real-time leaderboard on ClickHouse: top-N aggregation, rank columns with row_number(), per-region leaderboards in one query with LIMIT BY, and a typed API with polling React hooks.
A practical migration guide for moving ClickHouse queries from Kysely to hypequery: idiom-by-idiom mapping, generated schema types, what you gain, and what you honestly give up.
A tutorial on metered billing with ClickHouse: an append-only usage_events table, tenant-scoped usage and revenue metrics defined once in TypeScript, monthly rollups, and one definition shared by the invoicing job and the customer usage page.
How to enforce tenant isolation in application code for ClickHouse analytics: tenant-scoped serve contexts, tenantKey on datasets, builder-level filters, and why you should still keep row policies as a backstop.
The ClickHouse SAMPLE clause reads a fraction of your data for near-instant estimates. Learn how SAMPLE BY works, how to scale results, and what to use from TypeScript — approximate aggregates in hypequery or raw SQL via @clickhouse/client.
A retrofit guide for adding ClickHouse analytics to a running Express, Fastify, or Nest app: generate types from your live schema, wire one query builder into your existing DI, and ship a single endpoint before expanding.
Prisma has no ClickHouse connector, and the MySQL-compat-port workaround breaks on real analytics workloads. Here's why, and the Prisma-plus-ClickHouse-native pattern teams actually run in production.
ASOF JOIN matches each row to the closest earlier row in another table — trades to quotes, errors to deploys, readings to calibrations. Here's how it works in ClickHouse SQL and how to run it from a TypeScript app with hypequery.