Deterministic Ordering
Without a unique sort order, SQL may return tied rows in any order — so top-N lists, pages, and “latest record” picks can change between runs.
Without a unique sort order, SQL may return tied rows in any order — so top-N lists, pages, and “latest record” picks can change between runs.
An anti-join finds rows with no match on the other side — customers who never ordered. One NULL can make NOT IN return nothing; NOT EXISTS does not.
A query can run cleanly and still answer a different question. See how joins, NULLs, ordering, and aggregation levels change results, and how to catch it.
Learn which operations the two tools share, which concrete signals say the work has outgrown a sheet, and what moving to SQL actually buys.
Learn what a database session holds, which objects and settings die with it, and why connection pooling makes session state unreliable.
Learn how a view stores a query instead of rows, which data a read can see, how a materialized view differs, and what it does not guarantee.
Learn how a recursive CTE builds rows from an anchor query, what stops it, and where generated calendars and hierarchy walks are worth it.
Learn what it means for a CTE to be materialized or inlined, which engines decide what, and how execution strategy differs from name scope.
Learn what a temporary table stores, how long it lives, why its rows go stale, and how naming and support differ between database engines.
A WITH clause is not a temporary table. Compare scope, lifetime, visibility, and staleness with DuckDB examples.
Group database changes with commit and rollback, define the transaction boundary, and distinguish atomicity from correct or idempotent work.
Separate a window partition, ordering, and frame; distinguish seven rows from seven calendar days and make tied row selection deliberate.
Use nested queries and named WITH results to express SQL dependencies without assuming a fixed execution order or automatic speedup.
Define a group, separate WHERE from HAVING, and choose counts, averages, and denominators that match the intended population.
Predict matching row counts, distinguish unmatched rows from NULL attributes, and prevent repeated order amounts from inflating totals.
Convert text deliberately with CAST and TRY_CAST, preserve failed inputs, and distinguish a valid type from a valid business value.
Distinguish row identity from references, understand composite keys, and see which errors key constraints can and cannot prevent.
Understand SQL NULL, why ordinary comparisons can be unknown, and how filtering, counting, and COALESCE change a report.
Understand SQL through examples for filtering, cleaning, joins, aggregation, windows, and transactions in DuckDB.