Menu

Post image 1
Post image 2
1 / 2
0

Six SQL patterns I use to catch transaction fraud

DEV Community·Fixel Smith·18 days ago
#kcYu0ESn
Reading 0:00
15s threshold

Quick disclaimer: I do data work on a program-integrity team. Examples below use generic transaction tables and made-up scenarios. Nothing here comes from anything I've actually worked on or seen. Views are mine, not my employer's. Fraud detection in transaction data is mostly SQL. Not machine learning, not graph databases, not whatever Gartner is hyping this year. SQL, run against the right tables, with the right joins, looking for the right shapes. I work mostly with government-funded benefit programs, but the patterns below port over to anything with a transactions table: credit cards, healthcare claims, e-commerce, point-of-sale. If money moves and gets logged, these queries will find weird things in the log. Six patterns. Roughly in the order I'd build them out on a new dataset. 1. Velocity The simplest one. Someone with a stolen card wants to drain it before the holder notices. So they hit the card fast.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More