Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

💡 Overview

This project analyzes bank transaction data to detect fraudulent activity using SQL queries in PostgreSQL.

By examining customer behavior, transaction amounts, and time-based patterns, this analysis helps identify high-risk transactions and customers, supporting financial institutions in fraud prevention.

📂 Repository Structure

Bank-Transaction-Fraud-Analysis/
│
├── Dataset/    # Sample bank transaction data
├── SQL Queries/    # SQL Script File
|   ├── Analysis    # SQL scripts for analysis
|   |   ├── 1_Customer Analysis.sql
|   |   ├── 2_Fraud_Detection.sql
|   |   ├── 3_Transaction Pattern.sql
|   |   ├── 4_Risk & Segmentation.sql
|   |   ├── 5_Trend & Growth.sql
|   |   ├── 6_Product Merchant Analysis.sql
|   └── └── 7_Behavioral Insights.sql
|
|   ├── Initial Queries    # Initial SQL Queries
|   |   ├── Queries.sql
|   └── └── Schema.sql
|
└── README.md   # Project documentation

🔑 Key Analysis Questions

📊 Fraud Overview

  • Total number of fraudulent vs. non-fraudulent transactions
  • Percentage of transactions that are fraudulent

👥 Customer Analysis

  • Top 10 customers by total spending
  • Customers with repeated fraudulent transactions
  • Fraud by customer demographics (age, etc.)

⏰ Time-Based Patterns

  • Transactions per month
  • Fraud occurrence by hour and day
  • Identify peak hours/days with highest fraud rates

💰 Transaction Amount Patterns

  • Fraud distribution across transaction amount ranges
  • Identify transaction ranges with highest fraud risk

🗂 Dataset Details

Table Name: bank_transactions

Column Name Description
transaction_id Unique transaction ID
customer_id Unique customer identifier
customer_name Customer name
transaction_amount Transaction amount
transaction_time Timestamp of the transaction
is_fraud Fraud flag (1 = fraud, 0 = non-fraud)

🚀 Getting Started

  1. Clone the repository:
git clone https://github.com/Aaditya060/Bank-Transaction-Fraud-Analysis.git
cd Bank-Transaction-Fraud-Analysis
  1. Load the dataset into PostgreSQL.
  2. Run SQL queries from the SQL Queries/ folder to explore fraud patterns.

💡 Insights & Benefits

  • Detect hours, days, and transaction ranges with higher fraud risk

  • Identify high-risk customers and repeated fraudulent behavior

  • Helps banks improve fraud detection and risk mitigation

🔮 Future Enhancements

  • Integrate SQL analysis with Python or Tableau for visualization

  • Build automated fraud reporting dashboards

  • Apply machine learning to predict potential fraudulent transactions

⚖ License

  • This project is owned by Aaditya Jain & Lakshay Mittal. © Aaditya Jain & Lakshay Mittal 2025, All rights reserved.

🌟 Show Some Love

If you like this project, give it a ⭐ star on GitHub!

About

Detailed analysis bank transaction data to detect fraudulent activity using SQL queries in PostgreSQL.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors