{"id":22973774,"url":"https://github.com/shivamsharma32/datamart-case-study-sql-","last_synced_at":"2025-07-20T13:33:22.246Z","repository":{"id":220482228,"uuid":"751754224","full_name":"shivamsharma32/DataMart-Case-Study-SQL-","owner":"shivamsharma32","description":"Data Dart is my latest venture and I want your help to analyze the sales and performance of my venture. In June 2020 - large scale supply changes were made at Data Mart. All Data Mart products now use sustainable packaging methods in every single step from the farm all the way to the customer.","archived":false,"fork":false,"pushed_at":"2024-02-02T09:02:26.000Z","size":365,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T00:20:04.462Z","etag":null,"topics":["data-science","dataanalysis","datacleaning","datanalytics","mssql","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/shivamsharma32.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}},"created_at":"2024-02-02T08:56:46.000Z","updated_at":"2024-02-02T09:03:48.000Z","dependencies_parsed_at":"2024-02-02T10:46:29.249Z","dependency_job_id":null,"html_url":"https://github.com/shivamsharma32/DataMart-Case-Study-SQL-","commit_stats":null,"previous_names":["royalsivm/datamart-case-study-sql-","shivamsharma32/datamart-case-study-sql-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shivamsharma32/DataMart-Case-Study-SQL-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivamsharma32%2FDataMart-Case-Study-SQL-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivamsharma32%2FDataMart-Case-Study-SQL-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivamsharma32%2FDataMart-Case-Study-SQL-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivamsharma32%2FDataMart-Case-Study-SQL-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shivamsharma32","download_url":"https://codeload.github.com/shivamsharma32/DataMart-Case-Study-SQL-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivamsharma32%2FDataMart-Case-Study-SQL-/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135014,"owners_count":23881774,"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":["data-science","dataanalysis","datacleaning","datanalytics","mssql","sql"],"created_at":"2024-12-14T23:58:34.552Z","updated_at":"2025-07-20T13:33:22.228Z","avatar_url":"https://github.com/shivamsharma32.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":" # Data Mart Analysis\n ![image](https://github.com/Royalsivm/DataMart-Case-Study-SQL-/assets/153700930/345a0727-aadf-4e5b-8899-ccdb2f9ee080)\n\n  # INTRODUCTION:\nData Dart is my latest venture and I want your help to analyze the sales and performance of my venture. In June 2020 - large scale supply changes were made at Data Mart. All Data Mart products now use sustainable packaging methods in every single step from the farm all the way to the customer.\nI need your help to quantify the impact of this change on the sales performance for Data Mart and its separate business areas.\n\n# SCHEMA USED: WEEKLY_SALES TABLE\n![image](https://github.com/Royalsivm/DataMart-Case-Study-SQL-/assets/153700930/c9073227-7767-4afc-941c-6225fa0fb095)\n\n# CASE STUDY QUESTIONS\n\n # # A. Data Cleansing Steps\nIn a single query, perform the following operations and generate a new table in the data_mart schema named clean_weekly_sales:\n1.\tAdd a week_number as the second column for each week_date value, for example any value from the 1st of January to 7th of January will be 1, 8th to 14th will be 2, etc.\n2.\tAdd a month_number with the calendar month for each week_date value as the 3rd column\n3.\tAdd a calendar_year column as the 4th column containing either 2018, 2019 or 2020 values\n4.\tAdd a new column called age_band after the original segment column using the following mapping on the number inside the segment value\nsegment\tage_band\n1\tYoung Adults\n2\tMiddle Aged\n3 or 4\tRetirees\n5.\tAdd a new demographic column using the following mapping for the first letter in the segment values:\nsegment | demographic |\nC | Couples |\nF | Families |\n\n6.\tEnsure all null string values with an \"unknown\" string value in the original segment column as well as the new age_band and demographic columns\n7.\tGenerate a new avg_transaction column as the sales value divided by transactions rounded to 2 decimal places for each record\n\n\n# # B. Data Exploration\n1.\tWhich week numbers are missing from the dataset?\n2.\tHow many total transactions were there for each year in the dataset?\n3.\tWhat are the total sales for each region for each month?\n4.\tWhat is the total count of transactions for each platform?\n5.\tWhat is the percentage of sales for Retail vs Shopify for each month?\n6.\tWhat is the percentage of sales by demographic for each year in the dataset?\n7.\tWhich age_band and demographic values contribute the most to Retail sales?\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivamsharma32%2Fdatamart-case-study-sql-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivamsharma32%2Fdatamart-case-study-sql-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivamsharma32%2Fdatamart-case-study-sql-/lists"}