Skip to content

Aaditya060/Bank-Transaction-Fraud-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •