SQL docs
Reference patterns, function guides, and practical SQL examples for data engineering teams.
SQL reference
A practical guide to SQL syntax, functions, ranking, joins, and window patterns you can actually use in production.
Start here
Recipes
Copy-paste patterns for real problems — top N per group, dedup, pivot, gaps and islands.
Function reference
Browse the most-used SQL functions and their semantics.
Playground
Edit and run SQL in your browser against a seeded database.
Writing data
INSERT, UPDATE, and DELETE — not just SELECT.
Core topics
SELECT,FROM,WHERE, and filtering semanticsJOINpatterns for fact and dimension tables- window functions like
ROW_NUMBER,RANK, andDENSE_RANK NULLhandling,COALESCE, and boolean logic- aggregation, grouping, and ordering strategies
INSERT,UPDATE, andDELETEfor writing data, not just reading it- transactions and isolation levels for changes that have to succeed or fail together
- indexes and
EXPLAINfor making a query fast and proving it
Best practices
- prefer explicit
ORDER BYwhen rank-based logic matters - keep grouping and partition logic readable
- document edge cases before shipping reusable SQL
- test patterns in the playground before productionizing them
Was this page helpful?