
SQL · Data analysis · Free PDF
SQL cheat sheet
A free one-page SQL cheat sheet (PDF) with SELECT, filters, joins, GROUP BY, CASE, CTEs, subqueries and window functions, plus the order SQL runs in. No sign-up.
Download PDFWhat is on it
- Reading data with SELECT, WHERE, ORDER BY and LIMIT
- Filters: IN, BETWEEN, LIKE and NULL checks
- Summaries with COUNT, SUM, AVG, GROUP BY and HAVING
- Inner, left, right and full joins
- INSERT, UPDATE, DELETE and CREATE TABLE
- CASE and COALESCE
- CTEs and subqueries
- Window functions and UNION
Good to know: SQL runs in this order: FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT. That is why you cannot use a SELECT alias inside WHERE.
Questions
Is this SQL cheat sheet free?
Yes. Download the PDF with no sign-up and no email needed.
Which database does it work with?
The examples use standard SQL that works in most databases. Date functions and LIMIT differ between databases, so check yours for those.
Can I print it?
Yes. It is made to fit on one A4 page.