Skip to content

rameshanakapalli/Bank-Segmentation-Analysis-SQL-Project-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏦 Bank Segmentation Analysis (SQL Project)

This project simulates a real-world banking dataset and performs a series of SQL queries to extract valuable insights about customers, transactions, and geographic activity. It showcases my skills in SQL for data analysis, with a focus on financial data and customer segmentation.


Project Objective

To analyze simulated banking data and uncover key insights that can help drive strategic decisions such as:

  • Identifying high-value customers
  • Understanding transaction behaviors
  • Measuring regional banking performance
  • Detecting dormant and underutilized accounts

🛠️ Tools & Technologies

  • PostgreSQL (via pgAdmin)
  • SQL (CTEs, Joins, Aggregations, Window Functions)
  • Data Simulation using PostgreSQL functions

Project Structure

Phase Description
1. Data Modeling & Simulation Created 3 core tables: customers, accounts, transactions using realistic Nigerian names, cities, account structures, and activity patterns.
2. Data Querying Wrote 12 key SQL queries to extract insights and segment customer/account behavior.
3. Reporting Documented insights with purpose-driven explanations for each query.

📊 Key SQL Queries & Purposes

No. Query Title Purpose
1 Total Spend per Customer Calculate total amount spent per customer across all accounts.
2 Salary Trend Analysis Identify salary credit trends across months.
3 Most Active Accounts (Count) Find accounts with the highest number of transactions.
4 Most Active Accounts (Volume) Rank accounts by total transaction volume.
5 Monthly Transaction Breakdown View total transaction count and volume per month.
6 Yearly Transaction Breakdown Track annual transaction growth or decline.
7 Top 20 High-Value Customers Rank customers based on credit inflow (e.g., deposits, salary).
8 Dormant Accounts Detect customers who’ve had no activity in the last 12 months.
9 Single Product Customers Identify customers holding only one account.
10 Most Used Transaction Services Discover the most frequent transaction descriptions (e.g., airtime, utility).
11 City-wise Performance Measure total volume and number of customers per city.
12 Engagement by Region Analyze activity vs dormancy spread across regions.

🌟 Bonus Insight

Highest Spender by City
Uncovers the top spending customer in each city to help with targeted relationship management and regional performance boosts.


🧠 Key Learnings

  • Built and queried a structured banking dataset from scratch.
  • Strengthened core SQL concepts like JOIN, GROUP BY, FILTER, DATE_TRUNC, and CASE WHEN.
  • Gained deeper understanding of financial data behaviors — transaction types, account lifecycle, regional engagement.

About

A simulated SQL-based financial analytics project focused on customer segmentation, transaction behaviour, and regional performance within a Nigerian banking context.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors