Every ticket interview, tried cold before the walkthroughs
The symptom from each of the 45 tickets. Say the cause and the fix, check the key points, and get the course chapters behind every ticket you miss.
More in the SQL tutorial
- Types and functions
- IF and CASE
- About NULL values in SQL
- GROUP BY packs matching rows into one bucket
- A name and a SUM need a bucket
- WHERE drops rows before the buckets form
- HAVING throws away buckets
- HAVING filters groups
- WHERE filters rows, HAVING filters buckets
- General errors related to having
- Every column: the group key or an aggregate
- WHERE cannot see a bucket. LIMIT runs last.
- COUNT(customer) skips the unknown buyer
- Cheat sheet: GROUP BY and HAVING
- A join follows a foreign key
- A self-join reads the same table twice
- An anti-join keeps the row with no match
- When a join returns too many rows
- A subquery keeps the rows and still returns the average
- A derived table is a query in the FROM list
- Price < ANY means cheaper than at least one
- WITH names a table that lives for one query
- WITH RECURSIVE keeps joining the rows it just found
- OVER(): a group result on every row
- RANK() without ORDER BY is 1 on every row
- NTILE(4) splits an ordered list into four buckets
- LAG reads the previous row. LEAD reads the next.
- FIRST_VALUE reads the first row of the order
- Twenty patterns, each with a sample and a result
- A database is a stack, not a single store
- The disk moves a page, not a row
- A commit is durable when the log is durable
- Row store or column store
- Thirty index questions to try before the chapters
- Index types: structure, storage, rule
- A B-tree puts many keys in one page
- B-tree height is why 100 million rows still take three reads
- Clustered and secondary indexes
- Random or sequential primary keys: where does the next row…
- Why an index lookup can still be slow
- A covering index skips the table, until it does not
- The index is useful when the predicate matches its order
- A range is a slice of the leaf
- ORDER BY and GROUP BY can use the leaf order
- Why MySQL picks a B-tree over a hash index
- When an index exists and is still ignored or slow
- Rowstore, columnstore, unique, and filtered indexes
- Special cases: unique keys with NULL, JSON, maps, and long…
- Indexing a real feed: status filter, sort, cardinality…
- The buffer pool: which pages stay in memory
- The redo log makes a commit durable without writing the…
- The undo log can roll a change back and show an old version
- MVCC: readers do not block writers because old versions…
- A checkpoint moves the recovery starting line forward
- The replication log: changes other servers can replay
- ACID: the four promises behind every transaction
- All or nothing, in practice: where transactions surprise you
- One row or many: what a transaction must keep together
- Dirty, non-repeatable and phantom reads, replayed step by…
- Isolation levels: how much of other transactions you see
- When the snapshot is taken, and why a write sees newer data
- Write anomalies: lost updates, write skew and phantoms…
- Serializability: making concurrent transactions behave…
- Concurrency control: wait for a lock, or retry on conflict
- Locks: who waits for whom, and how much gets locked
- Distributed transactions and reads from copies
- Transaction mistakes: too long, too big, or never finished
- A database session from connect to disconnect
- What really happens when you run an INSERT
- What happens inside an UPDATE
- Hotspot updates: many sessions, one row
- DELETE is slow, DROP is not: how data really leaves
- How a database builds a query plan
- The join method is how matching rows are found
- How joins run, and why they beat correlated subqueries
- LIMIT can stop. OFFSET still walks the skipped rows.
- A cursor seeks. OFFSET still counts the skipped rows.
- Pitfalls that make simple and similar SQL slow
- Ten questions before you trust a fast query
- Why the first query is slow: cold reads
- Temporary tables and sort files: when a query spills to disk
- Rate limiting a database: protect it before it falls over
- What makes a database stall for a moment
- AI-assisted SQL analysis: from EXPLAIN to root cause
- Sharding: one table split across many database servers
- Choosing a shard key: skew, hot shards and hot keys
- Rebalancing: add a server without moving everything
- Request routing: how a query finds its shard
- Secondary indexes on shards: local vs global
- InnoDB storage: clustered pages, change buffer, adaptive…
- InnoDB redo, the binlog and the two-phase commit between…
- InnoDB read views, undo purge and the history list
- InnoDB gap and next-key locks: why a range is locked when…
- A primary key is known before execution starts
- Reading MySQL EXPLAIN: const, ref, range, index and ALL
- MySQL settings that change query speed
- MySQL diagnosis: slow log, optimizer trace, performance…
- PostgreSQL MVCC: tuple versions, VACUUM, HOT and wraparound
- PostgreSQL WAL, full-page writes and checkpoints
- PostgreSQL locks and isolation: snapshots, SSI and no gap…
- PostgreSQL index types: B-tree, GIN, GiST, BRIN, partial…
- Reading PostgreSQL EXPLAIN (ANALYZE, BUFFERS)
- PostgreSQL settings and diagnosis: shared_buffers…
- The engine you will build, one layer per chapter
- Find row 2 without reading every byte
- TLV: every value says its own type and length
- Insert, select, delete and update on a plain file
- A write-ahead log lets a crashed insert be replayed
- Cut the table file into pages the engine can find
- A B-tree index file turns a key into a file offset
- A small LRU cache saves most disk reads
- A full-text index maps each word to the rows that hold it
- From SQL text to rows: parse, plan and iterators
- A database design interview in seven steps
- Design the database for a Q&A site like Quora
- Design the database for a short-video app like TikTok
- Design the database for a booking site like Airbnb
- Design the database for an ephemeral messaging app like…
- Who gets the last phone in a flash sale
- Which database for a food delivery app
- The cache expired and the database fell over
- A live final: scale before the toss
- An app like ChatGPT: the answer is written live
- A product Q&A box on sale day
- Tatkal at 10:00: one seat, sold in stretches
- A group chat: one register, many sockets
- The ticket interview: you have AI, so they test judgement
- Interview: the same job runs twice
- Interview: checkout fails with “Deadlock found”
- Interview: one keyword made the page 40× slower
- Interview: rate limit is 2/min, 30 requests get through
- Interview: “just add an index” slowed ingestion
- Interview: “I changed my name, refresh shows the old one”
- Interview: importing 10M rows takes six hours
- Interview: everything got slow and the disk keeps growing
- Interview: wallet balance is wrong under load
- Interview: API p99 jumps 10× every night at 2 am
- Interview: profile lookups got 40× slower, writes are fine
- Interview: inserts stall, and only one page is hot
- Interview: the write succeeded, the next read shows an…
- Interview: inventory stayed locked after the coordinator…
- Interview: for four minutes, both regions took orders
- Interview: shoes show a 0% discount, then the report crashes
- Interview: March gained $50 after the deploy, and the…
- Interview: the new branch’s dashboard takes 38 seconds
- Interview: the index is right there, make Postgres use it
- Interview: warehouse and checkout overwrite the same order
- Interview: the bestsellers report now takes nine minutes
- Interview: an analyst query locked checkout
- Interview: the member is active and the email went out twice
- Interview: one shard is at 96% CPU and the other is idle
- Interview: the menu is slow, and the proposal is event…
- Interview: four dashboards disagree about whether the…
- Interview: checkout got slow the hour the warehouse job…
- Interview: the query is fast in staging and slow in…
- Interview: login looks up an email and reads the whole…
- Interview: the proposal splits one database into three…
- Interview: the order page joins four tables on every view
- Interview: every page view is a read-write query on the…
- Interview: Sarah and John both debit version 1
- Interview: the CTO read a blog post and wants to move…
- Interview: one table takes 50,000 writes a second, another…
- Interview: EU users wait on the ocean for every write, can…
- Interview: users search cars by color, but the table is…
- Interview: we added a fourth node and most of the data moved
- Interview: two people book the same room at noon, both get…
- Interview: everything is on the strongest consistency and…
- Interview: the order is saved, the message to search and…
- Interview: rename a column on a 600 GB table while 30…
- Interview: orders go to 16 shards in 2 regions, what…
- Interview: one celebrity posts, and every timeline in the…
- Interview: 5,000 customers share one database, and one of…
More courses
- Jobs, linked to lessons — Browse jobs where every requirement links to the chapter that teaches it. See how ready you are, how long the gap takes to close, and which listings look stale.
- Match a job post to courses — Paste a job post. Each skill is matched to a track here and put in learning order, foundations first.
- React from open source with patterns — Patterns extracted from Material UI, Radix, React Aria, React Hook Form, Redux Toolkit, TanStack, and Next.js — not slides about hooks.
- System Design — Core concepts first (SQL vs NoSQL, CAP, indexing, replication, sharding), then designs grouped by what carries them: the database, Redis, Kafka, or many services.
- Microservices — Microservice patterns one diagram at a time: how to split a monolith, how services talk, and how data stays consistent without distributed transactions.
- Kafka — A beginner-to-senior path through event logs, reliable delivery, production operations, and disaster recovery.
- Frontend system design — How a UI is sliced when it is a product, not a page: ownership of state, cache, routes, and what happens when the network lies.
- TypeScript in depth — The type system as a design tool. Inference, narrowing, generics, and the errors that mean the model is wrong — not a catalog of utility types.
- CSS in depth — See the box, then the page. Visual chapters from the box model through Flexbox surprises, Grid, selectors, and units, then backgrounds, shapes, and visual effects, each with a playground.
- Accessibility — Foundations first (WCAG in plain words, semantic HTML, lists, alt text), then hands-on HTML labs, a full pass of WAI-ARIA 1.3, and a final fix-the-page challenge.
- Docker — What an image is, why layers cache, and how containers find each other on a network.
- Redis — Fifteen Redis patterns, one picture each: cache, session, lock, counter, rate limiter, queue, and when Redis is the wrong tool.