backendgym backendgym · reps Sign in with GitHubSign in

06Block only the empty card

sql-designing-and-writing / reps/06/README.md

The request: block the cards whose balance is exactly zero. An assistant wrote answer.sql, which wraps its update in a rollback. Read it first, then run it and compare with the expected result below. Fix it so only the intended card changes.

Expected once fixed: 1 ID, card 2. The shipped file returns 5.

After the rep
  1. 1 Which condition widened the update, and what does an OR do to a filter that was meant to narrow it?