Skip to content

racharerk/Credit-Card-Fraud-Detection-Using-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Credit Card Fraud Detection using SQL

πŸ“– Overview

This project analyzes credit card transaction data to detect fraudulent activities using rule-based methods in SQL.

πŸ“Š Dataset

πŸ” Key Analysis

Fraud Distribution

  • Fraud accounts for 0.9% of all transactions
  • Highly imbalanced dataset

πŸ’³ Transaction Behavior

  • Fraudulent transactions have significantly higher values
  • Average fraud transaction is ~8x larger than normal

βš™οΈ Detection Rules

Rule 1: Amount Anomaly

  • Flag transactions > 3x customer average
  • Recall β‰ˆ 46%
  • Precision β‰ˆ 9%

Rule 2: Rapid Transactions

  • Flag transactions within short time intervals
  • Minimal impact on fraud detection

Combined Rules

  • Recall β‰ˆ 47%
  • Precision β‰ˆ 9%

πŸ’‘ Key Insights

  • Fraud is strongly associated with unusually high transaction amounts
  • Transaction frequency is not a strong fraud indicator in this dataset
  • Rule-based detection produces many false positives

πŸš€ Business Recommendations

  • Monitor high-value transactions in real-time
  • Combine multiple behavioral signals
  • Implement machine learning models for improved accuracy

πŸ› οΈ Tools Used

  • SQL (MySQL)
  • Python (Pandas)

πŸ“ Project Structure

β”œβ”€β”€ data/ β”œβ”€β”€ sql/ β”‚ └── fraud_detection.sql β”œβ”€β”€ README.md

About

This project analyzes credit card transaction data to detect fraudulent activities using rule-based methods in SQL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors