Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# E-Commerce High-Value Customer & Fraud Analytics A lightweight SQL case study focused on extracting business intelligence, identifying customer engagement gaps, and surfacing transactional risks using intermediate-to-advanced relational query patterns. ## 🛠️ Advanced SQL Concepts Covered * **Common Table Expressions (CTEs):** Decoupling and structural modularity for global aggregations. * **Multi-Value Subqueries (`IN` / `NOT IN`):** Cross-table data validation and list-based exclusion filters. * **Data Auditing & Analysis:** Writing production-grade reporting queries for risk management and growth marketing sectors. ## 📂 Project Architecture * `schema.sql`: Sets up the relational schema boundaries (`CUSTOMERS`, `ORDERS`, `PAYMENTS`) and initializes sample records. * `analytics_queries.sql`: Houses the structural SQL queries dedicated to fixing specific target business issues. ## 🚀 Execution & Summary Results ### 1. High Value VIP Identification Identifies orders generating higher revenue than the calculated platform benchmark average. * **Result:** `CUSTOMER_ID: 2` generated a high-tier order of `$2500.00`. ### 2. Customer Re-engagement List Extracts profiles who signed up but have not committed to their first platform transaction. * **Result:** Identified `David` (`France`) as an inactive account. ### 3. Payment Failure Risk Report Pulls order values mapping directly to unsuccessful payment gateways for financial auditing. * **Result:** Flagged `ORDER_ID: 1004` (`$150.00`) due to a transaction state of `FAILED`.