Cold Case~61min
The Comps That Exactly Covered What Went Missing
LOC-09's Ribeye 12oz shrinkage on two counts — 24 units on 2024-06-30, then 21 units on 2024-07-31 — is matched almost exactly, unit for unit, by a burst of manager-comp transactions for the very same item logged by the very same manager, MGR-22, the day before each count: $832.50 in "comps" that's really theft relabeled as free food. LOC-04 also has a large comp spike ($360.00, 30 transactions) the day before its count, but those comps are all Reserve Wine, and that count shows zero Ribeye shrinkage — a Valentine's Day wine promotion, unrelated to any missing inventory.
Tables you'll query
locationsinventory_countscomp_transactions
What you'll learn
JOINsAggregations & GROUP BYDate & Time Functions