A SQL interview often starts with a query and ends with a production consequence. Explain the requested population before typing, then check the relationship between the query and the table state. Reading an earlier Delta version is different from restoring it, and removing repeated result rows is different from resolving duplicate source updates.
This set combines four executable queries with two design questions. The queries use the retail records and a separate audit table. Each task resets its setup, so a mutation in one answer will not affect a later question. Watch the missing customer key, missing amount and repeated buyers. A NULL in a subquery can change a NOT IN predicate, and an aggregate can silently use a different denominator from the one the business asked for. Those details belong in your explanation.