Customer versions contain BusinessKey, UpdatedAt, and a unique LoadID. You need the latest row per BusinessKey with deterministic tie-breaking. Which design fits?

Published
  1. ROW_NUMBER partitioned by BusinessKey ordered by UpdatedAt DESC, LoadID DESC
  2. An unordered TOP 1 over the whole table
  3. MAX(UpdatedAt) without joining back to a row
  4. SELECT DISTINCT BusinessKey, all other fields

Comments — 0