SQL
Analytical SQL for people who own their data. Window functions for sessionization, cohort retention triangles, funnel queries with drop-off between steps, and the query shapes that stay fast on columnar storage.
7 guides on sql.
A/B Testing in Web Analytics: Getting Significance Right
Why 'variant B is winning' usually means nothing, how to compute significance for conversion tests, and the two mistakes — peeking and tiny samples — that make most A/B results fiction.
Safely Letting Users Run SQL Against Your Analytics
Exposing a SQL editor to users means accepting arbitrary queries. Parse-and-allowlist beats regex blocklists, plus row caps, statement timeouts and per-site scoping that cannot be escaped.
12 SQL Queries Every Web Analytics Dashboard Needs
Copy-paste DuckDB SQL for the core web analytics metrics — traffic KPIs, top pages, referrers, entry and exit pages, new vs returning, growth, and anomaly detection.
Sessionization Without Cookies
Defining a session when you cannot set a cookie. Daily-rotating identifiers, the 30-minute inactivity rule in SQL, and honest limits on cross-device and cross-day continuity.
Cohort Retention Analysis in SQL: Building the Triangle Chart
How to compute cohort retention from raw events — the classic triangle table, N-day vs unbounded retention, and reading the curve without fooling yourself.
SQL Window Functions for Sessionization and Funnel Analysis
How to turn a raw event stream into sessions, paths, and funnels using LAG, SUM OVER, and gap-and-island techniques — with runnable DuckDB SQL.
Designing a Star Schema for Web Analytics Data
How to model pageviews, sessions, and events as facts and dimensions — grain, surrogate keys, slowly changing dimensions, and where to denormalize for a columnar engine.