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.
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
- Total number of fraudulent vs. non-fraudulent transactions
- Percentage of transactions that are fraudulent
- Top 10 customers by total spending
- Customers with repeated fraudulent transactions
- Fraud by customer demographics (age, etc.)
- Transactions per month
- Fraud occurrence by hour and day
- Identify peak hours/days with highest fraud rates
- Fraud distribution across transaction amount ranges
- Identify transaction ranges with highest fraud risk
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) |
- Clone the repository:
git clone https://github.com/Aaditya060/Bank-Transaction-Fraud-Analysis.git
cd Bank-Transaction-Fraud-Analysis- Load the dataset into PostgreSQL.
- Run SQL queries from the SQL Queries/ folder to explore fraud patterns.
-
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
-
Integrate SQL analysis with Python or Tableau for visualization
-
Build automated fraud reporting dashboards
-
Apply machine learning to predict potential fraudulent transactions
- This project is owned by Aaditya Jain & Lakshay Mittal. ยฉ Aaditya Jain & Lakshay Mittal 2025, All rights reserved.
If you like this project, give it a โญ star on GitHub!