Skip to content

The SQL field guide

Better answers start with better checks.

Three practical SQL lessons for the moment before you trust a number. Run the example, inspect the failure, and keep the check.

Free examples · Fictional data · No signup

01 / Validate the source02 / Check the grain03 / Define the denominator

A small, reproducible place to start.

Extract the ZIP and open a terminal in the synehq-sql-field-guide folder. Each lesson runs in a fresh local DuckDB session. The CSV lesson reads the included sample file; the other scripts include their data. The setup notes cover installation, and the walkthroughs explain the expected results and where the examples stop.

duckdb < csv-audit.sql
duckdb < join-fanout.sql
duckdb < cohort-retention.sql

Put the checks to work

Review the query before you share the number.

A practical review of definitions, grain, missing values, joins, denominators, and time windows. Keep the evidence beside your query with a reusable Markdown template.

Make the analysis useful to the next person.

Explore how SyneHQ keeps questions, queries, results, and review together when a useful check becomes a shared workflow.