This exercise is a prequel to SQL alarms and outlier events detection.
This time we’ll look at detecting fraudulent payments. A good example is bad affiliate partnerships– a company agrees on a revenue share with a partner that promotes our product. Sometimes partners cheat and purchase our product themselves, then refund and hope that we won’t notice and pay them their “revenue share”.
Your job today is to find a day in the past month with the highest percentage of refunded purchases.
Only consider dates that have at least 5 purchases...