Skip to content

This GitHub repository has been established as a dedicated platform for the storage and presentation of data analysis projects conducted using SQL across various datasets. It serves as a centralized hub to showcase my proficiency in utilizing SQL to extract insights, manipulate data, and derive valuable conclusions from diverse datasets.

Notifications You must be signed in to change notification settings

Mariam-iftikhar/SQL-Data-Analysis-Projects

Repository files navigation

SQL Data Analysis Projects Portfolio

GitHub LinkedIn SQL

πŸ“‹ Overview

Welcome to my SQL Data Analysis Projects portfolio! This repository showcases my expertise in SQL programming and database analytics through real-world data analysis projects. Each project demonstrates my ability to extract meaningful insights, perform complex data transformations, and solve business problems using SQL queries and database management techniques.

As a Business Analytics graduate student specializing in data-driven decision making, I leverage SQL as a primary tool for data exploration, analysis, and reporting across diverse industries and datasets.


πŸ“Š Project Portfolio

1. πŸ’³ Credit Card Analysis

Folder: Credit Card Analysis

Description: Comprehensive analysis of credit card transaction data to identify spending patterns, fraud detection indicators, and customer segmentation insights.

Key SQL Techniques:

  • Complex JOINs (INNER, LEFT, RIGHT, FULL OUTER)
  • Aggregate functions (SUM, AVG, COUNT, MAX, MIN)
  • Window functions for running totals and rankings
  • Date/Time manipulation for transaction analysis
  • GROUP BY with HAVING clauses for filtered aggregations

Business Insights:

  • Transaction pattern analysis by time periods
  • High-value customer identification
  • Spending category breakdowns
  • Anomaly detection for potential fraud

2. πŸ” Exploratory Data Analysis

Folder: Exploratory_Data_Analysis

Description: Systematic data exploration using SQL to uncover patterns, detect anomalies, and generate summary statistics across various datasets.

Key SQL Techniques:

  • Statistical aggregate functions
  • CASE statements for conditional logic
  • Data profiling queries (NULL counts, DISTINCT values)
  • Correlation analysis through JOINs
  • Data quality assessment queries

Analysis Focus:

  • Data distribution and frequency analysis
  • Missing value identification
  • Outlier detection
  • Variable relationship exploration
  • Summary statistics generation

3. πŸ“· Instagram User Engagement Analysis

Folder: Instagram User Engagement

Description: Deep dive into social media engagement metrics to understand user behavior, content performance, and platform growth trends.

Key SQL Techniques:

  • Complex subqueries and CTEs (Common Table Expressions)
  • RANK() and DENSE_RANK() for top performers
  • Date arithmetic for engagement trends
  • Self-joins for follower/following analysis
  • Percentage calculations and rate metrics

Business Insights:

  • Most engaging content types
  • Peak engagement time periods
  • User retention and churn analysis
  • Influencer identification
  • Hashtag performance analytics

4. πŸ›’ Online Retail Data Analysis

Folder: Online Retail Data-Analysis

Description: E-commerce transaction analysis focusing on customer purchasing behavior, product performance, and sales optimization opportunities.

Key SQL Techniques:

  • Advanced JOINs across multiple tables
  • Sales funnel analysis queries
  • Product basket analysis
  • Time-series analysis for seasonal trends
  • Customer lifetime value calculations

Business Insights:

  • Revenue trends and seasonality patterns
  • Product performance rankings
  • Customer purchase frequency analysis
  • Cross-selling opportunities
  • Regional sales performance

5. 🎯 RFM Analysis (Recency, Frequency, Monetary)

Folder: RFM Analysis

Description: Customer segmentation using the RFM model to identify high-value customers and tailor marketing strategies.

Key SQL Techniques:

  • NTILE() for percentile-based segmentation
  • Date difference calculations for Recency
  • Aggregate functions for Frequency and Monetary values
  • CASE statements for scoring and classification
  • Multi-level GROUP BY for segment analysis

Business Insights:

  • Champion customers identification
  • At-risk customer detection
  • Customer segment distribution
  • Targeted marketing recommendations
  • Customer lifetime value estimation

RFM Segments Created:

  • Champions (High R, F, M)
  • Loyal Customers
  • Potential Loyalists
  • At Risk
  • Can't Lose Them
  • Hibernating

6. πŸͺ Walmart Sales Analysis

Folder: Walmart Sales Analysis

Description: Retail sales analysis examining store performance, product categories, and factors affecting sales volumes.

Key SQL Techniques:

  • Complex aggregations across time periods
  • Store performance comparisons
  • Product category analysis
  • Seasonal trend identification
  • Holiday impact analysis

Business Insights:

  • Top and bottom performing stores
  • Best-selling product categories
  • Seasonal sales patterns
  • Holiday sales spikes
  • Store-level recommendations

πŸ”§ SQL Skills Demonstrated

Core SQL Competencies

  • Query Fundamentals: SELECT, FROM, WHERE, ORDER BY, LIMIT
  • Joins: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, CROSS JOIN, Self-Joins
  • Aggregations: SUM, AVG, COUNT, MAX, MIN, GROUP BY, HAVING
  • Subqueries: Correlated and non-correlated subqueries
  • CTEs: Common Table Expressions for complex queries
  • Window Functions: ROW_NUMBER(), RANK(), DENSE_RANK(), LAG(), LEAD(), NTILE()
  • String Functions: CONCAT, SUBSTRING, UPPER, LOWER, TRIM, REPLACE
  • Date Functions: DATEADD, DATEDIFF, DATEPART, DATE_TRUNC
  • Conditional Logic: CASE WHEN, IIF, COALESCE, NULLIF

Advanced Techniques

  • Data cleaning and transformation
  • Multi-table complex JOINs (5+ tables)
  • Performance optimization with indexes
  • Query optimization and execution planning
  • Data validation and quality checks
  • Recursive queries
  • Pivot and unpivot operations

πŸ’Ό Business Analysis Capabilities

Analytical Skills

  • Customer Segmentation: RFM analysis, behavioral clustering
  • Sales Analytics: Trend analysis, forecasting, performance metrics
  • Product Analytics: Basket analysis, category performance
  • Web/Social Analytics: Engagement metrics, user behavior
  • Financial Analytics: Revenue analysis, profitability metrics

Business Intelligence

  • KPI development and tracking
  • Dashboard data preparation
  • Automated reporting queries
  • Data pipeline development
  • Ad-hoc analysis capabilities

πŸ”Ž Project Structure

SQL-Data-Analysis-Projects/
β”œβ”€β”€ Credit Card Analysis/
β”‚   β”œβ”€β”€ queries.sql
β”‚   β”œβ”€β”€ analysis_results/
β”‚   └── insights.md
β”œβ”€β”€ Exploratory_Data_Analysis/
β”‚   β”œβ”€β”€ eda_queries.sql
β”‚   └── findings.md
β”œβ”€β”€ Instagram User Engagement/
β”‚   β”œβ”€β”€ engagement_analysis.sql
β”‚   └── metrics.md
β”œβ”€β”€ Online Retail Data-Analysis/
β”‚   β”œβ”€β”€ retail_queries.sql
β”‚   └── insights.md
β”œβ”€β”€ RFM Analysis/
β”‚   β”œβ”€β”€ rfm_segmentation.sql
β”‚   └── customer_segments.md
β”œβ”€β”€ Walmart Sales Analysis/
β”‚   β”œβ”€β”€ sales_queries.sql
β”‚   └── analysis.md
└── README.md

🎯 Learning Outcomes & Impact

Technical Growth

  • Mastered complex SQL query construction
  • Developed efficient query optimization skills
  • Learned database design best practices
  • Gained experience with large-scale datasets
  • Built reusable query templates

Business Impact

  • Identified actionable customer insights
  • Enabled data-driven decision making
  • Improved reporting efficiency
  • Uncovered revenue optimization opportunities
  • Enhanced customer targeting strategies

πŸ› οΈ Technologies & Tools

  • Database Systems: Microsoft SQL Server (T-SQL), MySQL, PostgreSQL
  • Query Tools: SQL Server Management Studio (SSMS), MySQL Workbench
  • Data Visualization: Power BI (for SQL query results)
  • Version Control: Git, GitHub
  • Documentation: Markdown, SQL comments

πŸ“š How to Use This Repository

For Recruiters & Hiring Managers

  1. Browse project folders to see diverse analytical applications
  2. Review SQL queries to assess technical proficiency
  3. Read insights documents to understand business acumen
  4. Check query complexity to evaluate skill level

For Fellow Data Analysts

  1. Explore query patterns for learning and inspiration
  2. Adapt queries for your own datasets
  3. Study optimization techniques used in complex queries
  4. Review segmentation approaches for customer analytics

For Potential Collaborators

  • Feel free to suggest improvements or alternative approaches
  • Share feedback on query efficiency
  • Propose new analytical angles to explore

⭐ Key Strengths

  1. Query Complexity: Ability to write complex multi-table queries with CTEs and window functions
  2. Business Translation: Converting SQL results into actionable business recommendations
  3. Optimization Focus: Writing efficient queries for large datasets
  4. Documentation: Clear commenting and documentation practices
  5. Diverse Applications: Experience across multiple industries and use cases
  6. Problem-Solving: Analytical approach to breaking down complex questions into SQL logic

πŸ“ˆ Repository Statistics

  • Total Projects: 6 major analysis projects
  • Languages: 100% T-SQL / SQL
  • Query Complexity: Beginner to Advanced
  • Industries Covered: Retail, E-commerce, Finance, Social Media
  • Analysis Types: Descriptive, Diagnostic, Segmentation, Trend Analysis

πŸ“Œ Recent Updates

Last Updated: December 2025

This repository is actively maintained and regularly updated with new projects, query optimizations, and enhanced documentation.


πŸ“ License

This repository is available for educational and portfolio purposes. Feel free to reference or adapt queries for your own learning, with appropriate attribution.


"Data is the new oil, but SQL is the refinery that transforms raw data into valuable insights."


Thank you for exploring my SQL portfolio! πŸ”

Interested in discussing SQL techniques, data analysis approaches, or potential opportunities?
Let's connect!

⬆ Back to Top

About

This GitHub repository has been established as a dedicated platform for the storage and presentation of data analysis projects conducted using SQL across various datasets. It serves as a centralized hub to showcase my proficiency in utilizing SQL to extract insights, manipulate data, and derive valuable conclusions from diverse datasets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages