SQL Cheatsheet

The everyday SQL statements, grouped and searchable — copy any one.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A fast, searchable reference for the SQL you write most days. Statements are grouped so you can jump straight to the right pattern: querying with SELECT, filtering with WHERE, sorting and grouping, aggregates, joins, writing data (INSERT, UPDATE, DELETE), and schema changes. Each entry has a plain-English description and a one-click copy button.

How it works

Type a keyword or describe the task — join, group by, insert, index — and the list filters in real time to matching statements. Click Copy on any one to put it on your clipboard, then adapt the table and column names in your own database client. Nothing is executed here; it is a reference you paste from.

Example

Looking for grouped counts, search group by and you will find patterns such as:

SELECT status, COUNT(*) AS total
FROM orders
GROUP BY status
HAVING COUNT(*) > 10
ORDER BY total DESC;
TopicExample statement
QueryingSELECT * FROM users;
Filtering... WHERE created_at >= '2026-01-01'
Joins... a JOIN b ON a.id = b.a_id
WritingUPDATE users SET active = false WHERE id = 7;

Everything runs in your browser; nothing you type or copy is uploaded.

Ad placeholder (rectangle)