A backend interviewer asks you to explain the data contract behind ordinary query and write tasks. This easy round covers keys, NULLs, row grain and safe updates. Treat each answer as code or evidence you would be prepared to defend in a review.
Read each output contract before writing SQL or choosing a response. Use the supplied evidence and keep missing values distinct from zeros, blanks and absent keys. For an operational scenario, select the option that satisfies every stated requirement rather than the one that sounds fastest.
The SQL tasks run on fresh fictional records and are checked again after those records change. You may use any equivalent query that produces the required result and preserves the stated database contract. The concurrency tasks use a clearly labeled session model. No question claims access to a live backup, a standby or a production connection pool.
Use IS NULL; a zero amount is known and differs from an unknown amount.