Routine~13min

The Loyalty Points Leak

Finance noticed the loyalty liability on the books is lower than it should be. When you compare customer balances against their transaction history, 11 customers show a balance that's lower than their earned points — meaning redemptions happened that were never recorded as debit rows. The endpoint decremented the balance but never inserted the transaction.

Tables you'll query

loyalty_accountspoints_transactions

What you'll learn

Aggregations & GROUP BYJOINs
Investigate this case →