8 cards55 people studying this

SQL Mastery

Essential SQL queries, joins, aggregations, and optimization techniques for developers.

Share on XWhatsApp
Study this deck for free

Free account includes unlimited cards, FSRS v6 scheduling, and AI card generation.
No credit card required.

Try it — tap the card
What is the difference between INNER JOIN and LEFT JOIN?
92% likely forgotten
Tap to see the answer
INNER JOIN returns only matching rows from both tables. LEFT JOIN returns all rows from the left table plus matching rows from the right (NULLs for no match).
Tap to flip back
What is a database index and why use one?
Last reviewed 12 days ago
Tap to see the answer
A data structure (usually B-tree) that speeds up lookups on a column. Trade-off: faster reads but slower writes and more storage.
Tap to flip back
What is the difference between WHERE and HAVING?
87% likely forgotten
Tap to see the answer
WHERE filters rows before grouping. HAVING filters groups after GROUP BY. Use HAVING for conditions on aggregate functions.
Tap to flip back
What is normalization?
Fading — due 5 days ago
Tap to see the answer
Organizing data to reduce redundancy. Normal forms: 1NF (atomic values), 2NF (no partial dependencies), 3NF (no transitive dependencies).
Tap to flip back
What is a transaction and ACID?
79% likely forgotten
Tap to see the answer
A unit of work that is Atomic (all-or-nothing), Consistent (valid state), Isolated (concurrent safety), and Durable (persisted after commit).
Tap to flip back
What is a subquery vs a CTE?
Last reviewed 21 days ago
Tap to see the answer
Subquery is a nested SELECT. CTE (Common Table Expression) uses WITH clause for readability. CTEs can be recursive; subqueries cannot.
Tap to flip back
What does EXPLAIN do?
94% likely forgotten
Tap to see the answer
Shows the query execution plan — which indexes are used, join strategies, estimated row counts. Essential for query optimization.
Tap to flip back
What is the difference between DELETE, TRUNCATE, and DROP?
Fading — due 9 days ago
Tap to see the answer
DELETE removes rows (can use WHERE, logged). TRUNCATE removes all rows (faster, minimal logging). DROP removes the entire table structure.
Tap to flip back
Create your own AI flashcards

Create your own AI flashcards in 30 seconds — free

Get started for free

Want to track your progress with spaced repetition?

Sign up free to save this deck

Made with Forgetless — the AI flashcard app

Create your own deck in 30 seconds. Powered by the same algorithm as Anki.

Start free