SQL Basics Cheatsheet
The core SELECT/WHERE/ORDER BY syntax, statement families, and DML every SQL learner needs on day one.
Every cheatsheet, dialect quick reference and prep pack Sqlism has built. Beginner sheets are free for anyone; sign in free to unlock everything else.
The core SELECT/WHERE/ORDER BY syntax, statement families, and DML every SQL learner needs on day one.
Every join type — INNER, LEFT, RIGHT, FULL, CROSS, SELF — with the query and result shown side by side.
COUNT, SUM, AVG, MIN/MAX, GROUP BY, and the WHERE-vs-HAVING trap that trips up every beginner.
Numeric, text, date/time and boolean types, plus how auto-increment IDs are spelled across five dialects.
Scalar, correlated, and EXISTS subqueries, plus readable CTEs and recursive CTEs for hierarchies.
RANK, DENSE_RANK, ROW_NUMBER, LAG/LEAD and running totals — the OVER() clause explained piece by piece.
Text manipulation and date arithmetic, with MySQL and PostgreSQL syntax shown side by side.
Reading EXPLAIN plans, indexing strategy, and the six anti-patterns that quietly kill query performance.
Pagination, upserts, JSON functions and the quirks that are unique to MySQL 8+.
JSONB, arrays, RETURNING, and the syntax that sets PostgreSQL apart from the rest.
T-SQL syntax — TOP, OFFSET/FETCH, MERGE, IDENTITY — for anyone working in SQL Server.
VARIANT semi-structured data, Time Travel, zero-copy cloning, and Snowflake-only syntax.
PL/SQL syntax, ROWNUM pagination, the DUAL table, and other Oracle-specific behavior.
Dynamic typing, embedded-file architecture, and the syntax gaps to know before you rely on SQLite.
50 real interview questions with concise, worked answers across fundamentals, joins, queries, functions, performance and advanced SQL.
20 hands-on exercises against one e-commerce schema, beginner to expert, with a complete answer key.
No resources match your search. Try a different term or clear the filters.
The 4 beginner cheatsheets are open to anyone. Create a free Sqlism account to unlock the rest — every intermediate and advanced cheatsheet, all 6 dialect quick references, the Interview Prep Pack, and the Practice Workbook — plus save your progress everywhere else on the site.