SQL patterns I use to catch transaction fraud
The article, published on Fixelsmith Analytics, details SQL patterns for catching transaction fraud. It covers velocity checks (e.g., multiple transactions from same card in short time), geolocation anomalies (e.g., transactions from distant locations within minutes), and amount thresholds (e.g., amounts just below reporting limits). The patterns are implemented using window functions, self-joins, and conditional aggregation. The author claims these patterns reduce false positives by 40% while catching 95% of fraud. The post includes example queries and explains how to tune thresholds based on business rules. It also discusses handling edge cases like legitimate high-frequency transactions (e.g., subscriptions) and multi-card fraud rings.
Developers can directly apply these SQL patterns to build or improve fraud detection systems.