Using SQL and analytics to explore behaviour, detect anomalies, and reveal insights across 5 million financial transactions.

<aside>

https://github.com/angelcpizarro/financial-transactions-and-fraud-detection

</aside>


1. Overview

This project explores how data can help detect fraudulent activity and understand customer spending behaviour in financial transactions.

Using a dataset of around 5 million transactions, I analysed customer patterns and potential fraud indicators to identify trends and anomalies in financial behaviour.

The analysis focused on:

With an integrated Google Cloud workflow — data was stored in Google Cloud Storage, queried and analysed using BigQuery (SQL), exported and adjusted in spreadsheets (Google Sheets), and finally visualised through Looker Studio to communicate key insights.


2. Project Questions & Goals

This project aims to explore transaction behaviour and fraud detection patterns. The main question is:

<aside>

“How can we use transaction data to better understand customer behaviour and identify potential fraud?”

</aside>

The analysis will be carried out in sections with specific questions aiming to align with how data is used in digital banking to protect customers and optimise financial products:

Sections Questions
Customer behaviour “What does normal customer transaction behaviour look like across time, location, merchant category, and transaction type?”
Product & device patterns “How do transaction patterns vary by payment channel and device?”
Fraud detection “What are the most common indicators of fraud (by merchant, device, or anomaly score)?”
Strategic insight “How can data-driven insights improve fraud prevention and user experience?”

3. Data Validation & Exploration

Before the analysis, the dataset was cleaned and checked for consistency.

3.0 Dataset summary

<aside>

Row count: 5 million transactions

Unique sender accounts: 896,513

Date range: from 2023-01-01 to 2024-01-01

</aside>