{"id":32035358,"url":"https://github.com/bakulwani/data-mart-weekly-sales","last_synced_at":"2026-02-21T11:01:41.923Z","repository":{"id":301853222,"uuid":"1010482835","full_name":"bakulwani/Data-Mart-Weekly-Sales","owner":"bakulwani","description":" Cleaned and analyzed weekly sales data using SQL to build a business-focused data mart with KPIs, customer segmentation, and platform insights.","archived":false,"fork":false,"pushed_at":"2025-06-29T07:17:50.000Z","size":255,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-28T19:46:45.129Z","etag":null,"topics":["customer-segmentation","data-analysis","data-cleaning","etl","kpi-analysis","mysql","sales-analysis","sql"],"latest_commit_sha":null,"homepage":"","language":null,"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/bakulwani.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-29T06:56:49.000Z","updated_at":"2025-06-29T08:26:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"24b05a44-4034-48d4-91d1-4718901ef1f3","html_url":"https://github.com/bakulwani/Data-Mart-Weekly-Sales","commit_stats":null,"previous_names":["deller23/data-mart-weekly-sales","bakulwani/data-mart-weekly-sales"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bakulwani/Data-Mart-Weekly-Sales","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakulwani%2FData-Mart-Weekly-Sales","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakulwani%2FData-Mart-Weekly-Sales/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakulwani%2FData-Mart-Weekly-Sales/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakulwani%2FData-Mart-Weekly-Sales/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bakulwani","download_url":"https://codeload.github.com/bakulwani/Data-Mart-Weekly-Sales/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakulwani%2FData-Mart-Weekly-Sales/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T09:33:50.764Z","status":"ssl_error","status_checked_at":"2026-02-21T09:33:19.949Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["customer-segmentation","data-analysis","data-cleaning","etl","kpi-analysis","mysql","sales-analysis","sql"],"created_at":"2025-10-17T06:51:33.404Z","updated_at":"2026-02-21T11:01:41.918Z","avatar_url":"https://github.com/bakulwani.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 Data Mart Project – Weekly Sales Analysis\n\nThis project builds a focused **sales data mart** using SQL. It demonstrates my ability to clean, transform, and analyze real-world transactional data to extract business insights. All logic is implemented using pure SQL, with no external tools or programming.\n\n---\n\n## 🧠 What This Project Demonstrates\n\n- ✅ End-to-end SQL-based data transformation and analysis\n- ✅ Data cleaning and enrichment using string and date functions\n- ✅ Customer segmentation by age and demographic\n- ✅ Business metric analysis (sales, transactions, platform performance)\n- ✅ Use of **CTEs**, **window functions**, **aggregations**, and **subqueries**\n\n---\n\n## 📁 Project Structure\n\n|File Name                              | Description                                                                 |\n|---------------------------------------|-----------------------------------------------------------------------------|\n| `01_create_and_load_weekly_sales.sql` | Creates the `weekly_sales` table and inserts 1000+ rows of data             |\n| `02_weekly_sales_analysis.sql`        | Cleans the raw data and performs 7 key business analyses                    |\n| `README.md`                           | Project documentation (you’re reading it)                                   |\n\n---\n\n## 🔍 Key Business Insights Analyzed\n\nThis project answers real-world business questions such as:\n\n1. **Which week numbers are missing from the sales records?**\n2. **How do transactions vary by year?**\n3. **What are the total sales by region and month?**\n4. **How do Retail and Shopify platforms compare in monthly sales?**\n5. **What percentage of sales is contributed by different demographics?**\n6. **Which age and demographic groups contribute the most to Retail sales?**\n\n---\n\n## 🧹 Data Cleaning Highlights\n\n- Replaced missing values in the `segment` column with `'Unknown'`\n- Derived new columns:\n  - `week_number`, `month_number`, `calendar_year` from `week_date`\n  - `age_band` using `RIGHT(segment, 1)`\n  - `demographic` using `LEFT(segment, 1)`\n- Created a `clean_weekly_sales` table with cleaned and enriched data\n- Calculated average transaction value per row\n\n---\n\n## ⚙️ SQL Concepts Used\n\n- `CASE` statements for classification and segmentation\n- String functions like `LEFT()`, `RIGHT()`\n- Date functions like `WEEK()`, `MONTH()`, `YEAR()`\n- Aggregations (`SUM()`, `GROUP BY`)\n- Common Table Expressions (CTEs)\n- Window functions (`OVER(PARTITION BY ...)`)\n- NULL handling and derived metrics\n\n---\n\n## 🚀 How to Run This Project\n\n1. Open **MySQL Workbench**\n2. Run the file `01_create_and_load_weekly_sales.sql`  \n   → This will create the base table and load data\n3. Run the file `02_weekly_sales_analysis.sql`  \n   → This will create a cleaned table and perform all analysis queries\n4. Explore the results from each query block\n\n---\n\n## 🧑‍💻 About Me\n\nI'm an aspiring **Data Analyst** with skills in:\n\n- SQL and relational database systems\n- Business logic and metrics interpretation\n- Data cleaning and reporting\n- End-to-end problem solving using structured query language\n\nThis project is one of the ways I showcase my practical understanding of real-world sales data analytics.\n\n---\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakulwani%2Fdata-mart-weekly-sales","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbakulwani%2Fdata-mart-weekly-sales","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakulwani%2Fdata-mart-weekly-sales/lists"}