This project simulates a real-world e-commerce database for "TechMart Pakistan". The goal was to analyze sales trends, identify high-value customers, and calculate category performance using PostgreSQL.
- Database: PostgreSQL 16
- Interface: DBeaver
- Language: SQL (Standard)
- Revenue Drivers: Identified "Laptops" as the highest revenue-generating category, significantly outperforming others.
- High-Value Customers: Isolated a segment of customers spending >50,000 PKR to target for future loyalty programs.
- Performance Benchmarks: Calculated average transaction values to filter out underperforming product categories.
- DDL & DML: Creating table structures and inserting transactional data.
- Complex Filtering: Using
WHERE,AND, and wildcards for pattern matching. - Advanced Aggregation: Using
GROUP BY,SUM, andAVGfor reporting. - Logical Constraints: Filtering aggregated groups using
HAVING.
- Download the
TechMart_Analysis_Script.sqlfile. - Open it in DBeaver or any SQL tool.
- Run the script to create the database and view the analysis results.