

Free Beginner SQL Cheat Sheet — Essential Commands You Actually Use
This is a free, beginner-friendly SQL cheat sheet you can use right now. Save it, practice it, and refer back anytime.
1) SELECT - Read data
Get rows from a table:
SELECT * FROM table_name;
2) WHERE - Filter results
Only rows that match a condition:
SELECT * FROM users WHERE active = 1;
3) INSERT - Add new rows
Insert new data:
INSERT INTO users (name, age) VALUES ('Alex', 22);
4) UPDATE - Change existing rows
Modify data:
UPDATE users SET age = 23 WHERE name = 'Alex';
5) DELETE - Remove rows
Delete rows you don’t need:
DELETE FROM users WHERE id = 5;
6) ORDER BY - Sort rows
Sort results ascending or descending:
SELECT * FROM users ORDER BY age DESC;
7) LIMIT - Only so many rows
Get only a few rows:
SELECT * FROM users LIMIT 10;
8) COUNT - Count rows
Count how many rows match:
SELECT COUNT(*) FROM users;
9) JOIN - Combine tables
Match data across tables:
SELECT orders.id, users.name
FROM orders
JOIN users ON orders.user_id = users.id;
10) GROUP BY - Group and summarize
Group rows into totals:
SELECT country, COUNT(*)
FROM users
GROUP BY country;
---
QUICK PRACTICE TIP
Try these on a free SQL sandbox like SQLite online or DB Fiddle.
Follow me for more free coding cheat sheets.
