Free PDF · Updated for v1.5

The DuckDB Cheatsheet

Every query pattern, function, and feature from v1.0 to v1.5 - on two pages.

A two-page reference for developers who already know SQL and want to move fast with DuckDB. Covers the full DuckDB surface in a scannable, copy-paste-ready format. Built for humans and LLMs alike.

What's inside

Two pages covering the DuckDB features that matter most in practice.

DuckDB Essentials

FROM-first queries, SELECT modifiers, file I/O, complex types (lists, structs, maps, variants), lambdas, window functions, advanced joins, CTEs, and extensions.

What's New

Version-by-version changelog from June 2024 through March 2026. MERGE INTO, VARIANT, GEOMETRY, time travel, TRY expressions, and more.

CLI Tips & Tricks

Output modes, dot commands, inline bar charts, progress bars, and custom syntax highlighting colors.

A taste of what's inside

DuckDB-specific patterns you'll actually use. This is a fraction of what the cheatsheet covers.

duckdb-cheatsheet.sql
-- No SELECT needed
FROM 's3://bucket/data/*.parquet';

-- Drop columns you don't want
SELECT * EXCLUDE (internal_id, debug_col)
FROM users;

-- Lambda over a list column
SELECT list_transform(scores, lambda x: x * 2)
FROM students;

-- Match trades to nearest prior quote
SELECT * FROM trades
ASOF JOIN quotes
  ON trades.ticker = quotes.ticker
  AND trades.ts >= quotes.ts;

-- First row per group, one line
SELECT * FROM t
QUALIFY row_number() OVER (
  PARTITION BY group_col
  ORDER BY score DESC) = 1;

Get the DuckDB Cheatsheet

Two pages. Print it, bookmark it, or feed it to your LLM

Get the DuckDB Cheatsheet

Congrats! Redirecting youOne sec