{"id":18553422,"url":"https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions","last_synced_at":"2025-08-29T05:32:21.195Z","repository":{"id":255681618,"uuid":"850357085","full_name":"itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions","owner":"itsmeyogesh22","description":"Included in Serious SQL Virtual apprenticeship program,  this repository contains solutions for all eight different case studies crafted by Danny Ma. For more information please visit: https://8weeksqlchallenge.com/","archived":false,"fork":false,"pushed_at":"2024-12-18T11:16:20.000Z","size":3240,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T01:18:09.275Z","etag":null,"topics":["8weeksqlchallenge","data","dataanalytics","datawithdanny","postgresql","sql","sqlserver-2022","t-sql"],"latest_commit_sha":null,"homepage":"","language":"SQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsmeyogesh22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2024-08-31T14:48:25.000Z","updated_at":"2024-12-18T11:16:24.000Z","dependencies_parsed_at":"2024-09-06T18:02:29.611Z","dependency_job_id":"602cc94b-8977-4383-b34f-cdc04497b857","html_url":"https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions","commit_stats":null,"previous_names":["itsmeyogesh22/8-weeks-sql-challenge","itsmeyogesh22/solved-8-weeks-sql-challenge-correct-solutions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsmeyogesh22","download_url":"https://codeload.github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636072,"owners_count":24967979,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["8weeksqlchallenge","data","dataanalytics","datawithdanny","postgresql","sql","sqlserver-2022","t-sql"],"created_at":"2024-11-06T21:17:02.370Z","updated_at":"2025-08-29T05:32:20.967Z","avatar_url":"https://github.com/itsmeyogesh22.png","language":"SQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align = \"left\" style=\"list-style: none;\"\u003e\u003cimg width = \"75\" height = \"75\" align = \"center\" src = https://github.com/user-attachments/assets/dae777b7-c0cb-4c13-94f6-9994c4e8d164\u003e Overview\u003c/h2\u003e\n\u003cdiv id=\"box-shadow-panel\"\u003e\n    \u003cpre align = \"left\" class = 'w-para' \n       style = \"\n                font-family: Consolas,monaco,monospace; \n                padding: 16px 17px;\n                border: 4px solid #000;\n                background-color: rgb(232, 219, 217);\n                color: #000;\n                font-size: 2rem;\n                font-weight: 60;\n                margin-left: 15px;\n                margin-right: 15px;\n                margin-bottom: 10px; \n               \"\u003e\n\u003ch1 align = \"left\" style=\"list-style: none;\"\u003e 8 Weeks SQL Challenge (by Danny Ma)\u003c/h1\u003e\u003ch2\u003e\nThe \"8 Weeks SQL Challenge\" is a comprehensive set of case studies designed to \nstrengthen SQL skills and provide hands-on experience in solving real-world \nbusiness problems. Each case study simulates a unique scenario that mimics \nchallenges faced in data analytics, enabling participants to analyze datasets, \nwrite SQL queries, and draw meaningful insights.\u003c/h2\u003e\n\u003ch3\u003eThe challenge is perfect for aspiring data analysts, data scientists, and database \nprofessionals looking to build and showcase their SQL expertise. Or as Danny stated in \na LinkedIn post: \"These case studies are not like a walk in the park\".\n\u003c/h3\u003e\n\u003c/pre\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cbr\u003e\u003c/br\u003e\n\u003ch3 align = \"left\"\u003eFor Serious SQL Course visit:  \u003ca href = \"https://www.datawithdanny.com/courses/serious-sql\"\u003e\u003cimg width = 60 height = 60 align = \"center\" src = https://github.com/user-attachments/assets/6c37b5cc-b73b-4a3f-8227-adc5bbf43e5d\u003e\u003c/a\u003e\u003c/h3\u003e\n\u003ch3 align = \"left\"\u003eFor 8 Weeks SQL Challenge by Danny Ma visit: \u003ca href = \"https://8weeksqlchallenge.com/\"\u003e\u003cimg width = 60 height = 60 align = \"center\" src = https://github.com/user-attachments/assets/106699bf-0c2a-4d4d-9f8f-8a2e21c7552b\u003e\u003c/a\u003e\u003c/h3\u003e\n\u003cbr\u003e\u003c/br\u003e\n\n\u003ch2 align = \"left\" style=\"list-style: none;\"\u003e\u003cimg width = \"75\" height = \"75\" align = \"center\" src = https://github.com/user-attachments/assets/a2d2a15b-17a9-4b20-abca-0f7fb5b63384\u003e Skills Demonstrated\u003c/h2\u003e\n\n- **SQL Query Writing**:  \n  - Writing efficient queries for data filtering, aggregation, and joining tables.\n  - Using advanced SQL techniques such as window functions, CTEs (Common Table Expressions), and subqueries.\n\n- **Data Cleaning**:  \n  - Handling missing values, duplicates, and inconsistent data.\n  - Transforming raw data into analysis-ready formats.\n\n- **Data Analysis**:  \n  - Identifying trends, patterns, and outliers in datasets.\n  - Applying business logic to extract actionable insights.\n\n- **Performance Optimization**:  \n  - Refactoring queries for better execution time.\n  - Understanding indexing and optimizing joins.\n\n- **Problem-Solving Mindset**:  \n  - Translating business problems into SQL-driven solutions.\n  - Communicating findings in a clear and concise manner.\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003ch2 align = \"left\" style=\"list-style: none;\"\u003e\u003cimg width = \"75\" height = \"75\" align = \"center\" src = https://github.com/user-attachments/assets/8f9ff713-5a92-416e-980d-85400bd6f3f8\u003e Case Studies Overview\u003c/h2\u003e\n\n### 1. Case Study #1: Danny's Diner \n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%231%20-%20Danny's%20Diner/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%231%20-%20Danny's%20Diner/SQL%20Server%20Implementation)\n- **Objective**: Analyze customer behavior to provide insights for increasing loyalty and sales.\n- **Key Focus**: Customer segmentation, purchasing patterns, and loyalty metrics.\n\u003cbr\u003e\n\n### 2. Case Study #2: Pizza Runner\n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%232%20-%20Pizza%20Runner/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%232%20-%20Pizza%20Runner/SQL%20Server%20Implementation)\n- **Objective**: Optimize pizza delivery operations by analyzing order and runner performance.\n- **Key Focus**: Delivery times, cancellation rates, and operational efficiencies.\n\u003cbr\u003e\n\n### 3. Case Study #3: Foodie-Fi\n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%233%20-%20Foodie-Fi/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%233%20-%20Foodie-Fi/SQL%20Server%20Implementation)\n- **Objective**: Understand subscription behavior and churn rates for a food subscription service.\n- **Key Focus**: Customer retention, plan changes, and revenue trends.\n\u003cbr\u003e\n\n### 4. Case Study #4: Data Bank\n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%234%20-%20Data%20Bank/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%234%20-%20Data%20Bank/SQL%20Server%20Implementation)\n- **Objective**: Analyze financial transaction data to provide insights into customer spending habits.\n- **Key Focus**: Fraud detection, spending categorization, and account activity.\n\u003cbr\u003e\n\n### 5. Case Study #5: Data Mart\n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%235%20-%20Data%20Mart/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%235%20-%20Data%20Mart/SQL%20Server%20Implementation)\n- **Objective**: Evaluate sales performance and inventory management for a retail business.\n- **Key Focus**: Sales trends, product popularity, and seasonal performance.\n\u003cbr\u003e\n\n### 6. Case Study #6: Clique Bait\n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%236%20-%20Clique%20Bait/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%236%20-%20Clique%20Bait/SQL%20Server%20Implementation)\n | [ER Diagram](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%236%20-%20Clique%20Bait/Enterprise%20Relationship%20Diagram)\n- **Objective**: Assess the performance of an online ad platform and provide recommendations to improve engagement.\n- **Key Focus**: Click-through rates, campaign effectiveness, and user behavior.\n\u003cbr\u003e\n\n### 7. Case Study #7: Balanced Tree Energy Co.\n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%237%20-%20Balanced%20Tree/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%237%20-%20Balanced%20Tree/SQL%20Server%20Implementation)\n- **Objective**: Monitor energy usage and suggest energy-saving measures.\n- **Key Focus**: Usage patterns, cost optimization, and environmental impact.\n\u003cbr\u003e\n\n### 8. Case Study #8: Fresh Segments\n\nSolutions: [PostgreSQL Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%238%20-%20Fresh%20Segments/PostgreSQL%20Implementation) | [SQL Server Implementation](https://github.com/itsmeyogesh22/Solved-8-Weeks-SQL-Challenge-Correct-Solutions/tree/f5efe504d0545cd4eaa72b53382e7b0ac797c9ca/Case%20Study%20%238%20-%20Fresh%20Segments/SQL%20Server%20Implementation)\n- **Objective**: Segment customers for a grocery delivery service and personalize marketing efforts.\n- **Key Focus**: Customer segmentation, basket analysis, and purchasing trends.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmeyogesh22%2FSolved-8-Weeks-SQL-Challenge-Correct-Solutions/lists"}