About this SQL cheatsheet
A compact SQL reference covering querying, joins, aggregation, window functions, CTEs, data modification, schema changes, indexes and transactions.
Most statements are standard SQL and work everywhere. When syntax differs between databases, the entry is tagged with the dialects that support it: PostgreSQL, MySQL, SQLite or SQL Server.
How to use it: search for a keyword (e.g. upsert, rank, json) or pick a section. Click a statement to copy it.