{"id":24489676,"url":"https://github.com/asleshagaikar/sql-sales-inventory-analysis-eda","last_synced_at":"2025-03-15T01:17:52.427Z","repository":{"id":273494817,"uuid":"919901219","full_name":"asleshagaikar/SQL-Sales-Inventory-Analysis-EDA","owner":"asleshagaikar","description":"This project provides a robust framework for performing data analysis on sales, inventory, and customer data stored in a PostgreSQL database. The SQL scripts implemented in this project offer insights into key performance indicators (KPIs), customer segmentation, product trends, and operational efficiency, enabling better business decision-making. ","archived":false,"fork":false,"pushed_at":"2025-01-23T20:55:08.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T01:17:49.010Z","etag":null,"topics":["postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asleshagaikar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-21T08:10:10.000Z","updated_at":"2025-01-23T20:55:11.000Z","dependencies_parsed_at":"2025-01-21T09:20:47.640Z","dependency_job_id":"327c4520-3312-4cfc-8845-2339be1941df","html_url":"https://github.com/asleshagaikar/SQL-Sales-Inventory-Analysis-EDA","commit_stats":null,"previous_names":["asleshagaikar/sql-sales-inventory-analysis-eda"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asleshagaikar%2FSQL-Sales-Inventory-Analysis-EDA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asleshagaikar%2FSQL-Sales-Inventory-Analysis-EDA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asleshagaikar%2FSQL-Sales-Inventory-Analysis-EDA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asleshagaikar%2FSQL-Sales-Inventory-Analysis-EDA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asleshagaikar","download_url":"https://codeload.github.com/asleshagaikar/SQL-Sales-Inventory-Analysis-EDA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243668231,"owners_count":20328042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postgresql","sql"],"created_at":"2025-01-21T17:15:19.611Z","updated_at":"2025-03-15T01:17:52.409Z","avatar_url":"https://github.com/asleshagaikar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comprehensive Sales and Inventory Analysis using PostgreSQL - EDA\nThis project provides a robust framework for performing data analysis on sales, inventory, and customer data stored in a PostgreSQL database. The SQL scripts implemented in this project offer insights into key performance indicators (KPIs), customer segmentation, product trends, and operational efficiency, enabling better business decision-making.\n\nThe project showcases how to leverage SQL queries for data cleaning, aggregation, and advanced analytics, including running totals, cumulative sales, and time-based trends. It can be easily adapted to different datasets and industries to provide meaningful insights.\n\n\nKey Features:\n\n1) Data Cleaning:\n\nIdentify and remove duplicate sales records.\n\nImpute missing product prices with the average price per category.\n\nFill missing stock quantities with default values.\n\n\n2) Sales Insights:\n\nTop Selling Products: Identify the most popular products by units sold and revenue generated.\n\nCustomer Segmentation: Analyze customer spending patterns by membership type.\n\nGender-Based Trends: Understand purchasing behavior across product categories for different genders.\n\nPeak Sales Days: Identify the most profitable sales days.\n\n\n3) Inventory Management:\n\nAnalyze inventory levels and flag products for reorder.\n\nCalculate inventory turnover ratios for better stock management.\n\n\n4) Time-Based Trends:\n\nMonthly revenue trends.\n\nWeekly revenue patterns.\n\nBest-selling products by quarter.\n\n\n5) Advanced Analytics:\n\nCalculate running totals of revenue by month.\n\nCompute cumulative sales for each product over time.\n\nAnalyze running 7-day average revenue trends.\n\nStore and City-Level Performance:\n\n\n**Data Model:\n\nThe project uses a relational data model with the following key tables:\n\nCustomers: Customer information, including demographics and membership type.\n\nProducts: Product details, including price, cost, and stock quantity.\n\nSales: Transaction data, including quantity sold, sale date, and associated product and customer IDs.\n\nStores: Store information, including name and location.\n\n\n**Skills Demonstrated:\n\n1)Data Cleaning: Removal of duplicates, handling null values, and ensuring data consistency.\n\n2)Joins: Combining data across multiple tables for holistic analysis.\n\n3)Aggregations: Summarizing data using functions like SUM, AVG, and COUNT.\n\n4)Window Functions: Using ROW_NUMBER() and RANK() to rank top-selling products.\n\n5)Subqueries and CTE: Efficiently calculating metrics like customer lifetime value.\n\n6)Case Statements: Categorizing data for easier interpretation (e.g., low stock status).\n\n\n**Technologies Used:\n\nDatabase: PostgreSQL, \nQuery Language: SQL, \nDataset: Simulated data for customers, products, sales, and stores.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasleshagaikar%2Fsql-sales-inventory-analysis-eda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasleshagaikar%2Fsql-sales-inventory-analysis-eda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasleshagaikar%2Fsql-sales-inventory-analysis-eda/lists"}