SQL docs

Reference patterns, function guides, and practical SQL examples for data engineering teams.

Edit this pageReport an issue

SQL reference

A practical guide to SQL syntax, functions, ranking, joins, and window patterns you can actually use in production.

Start here

Core topics

  • SELECT, FROM, WHERE, and filtering semantics
  • JOIN patterns for fact and dimension tables
  • window functions like ROW_NUMBER, RANK, and DENSE_RANK
  • NULL handling, COALESCE, and boolean logic
  • aggregation, grouping, and ordering strategies
  • INSERT, UPDATE, and DELETE for writing data, not just reading it
  • transactions and isolation levels for changes that have to succeed or fail together
  • indexes and EXPLAIN for making a query fast and proving it

Best practices

  • prefer explicit ORDER BY when 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?

On this page