{"id":51112824,"url":"https://github.com/nafis2508/urban-eats-sql-analysis","last_synced_at":"2026-06-24T19:01:14.734Z","repository":{"id":315906829,"uuid":"1061219016","full_name":"nafis2508/urban-eats-sql-analysis","owner":"nafis2508","description":"SQL business analytics and relational database design project for retail and café operations.","archived":false,"fork":false,"pushed_at":"2026-06-05T09:30:57.000Z","size":25276,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T12:12:51.495Z","etag":null,"topics":["business-analytics","database-design","mysql","sql","sql-analysis"],"latest_commit_sha":null,"homepage":"","language":null,"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/nafis2508.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-21T13:39:31.000Z","updated_at":"2026-06-05T09:31:10.000Z","dependencies_parsed_at":"2025-09-21T15:39:18.549Z","dependency_job_id":null,"html_url":"https://github.com/nafis2508/urban-eats-sql-analysis","commit_stats":null,"previous_names":["nafis2508/urbaneats","nafis2508/urban-eats-sql-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nafis2508/urban-eats-sql-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafis2508%2Furban-eats-sql-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafis2508%2Furban-eats-sql-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafis2508%2Furban-eats-sql-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafis2508%2Furban-eats-sql-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nafis2508","download_url":"https://codeload.github.com/nafis2508/urban-eats-sql-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafis2508%2Furban-eats-sql-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34745456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"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":["business-analytics","database-design","mysql","sql","sql-analysis"],"created_at":"2026-06-24T19:01:12.210Z","updated_at":"2026-06-24T19:01:14.727Z","avatar_url":"https://github.com/nafis2508.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍴 SQL Business Analytics \u0026 Database Design Project | UrbanEats Café Chain\n\n## 📌 Project Overview\n\nUrbanEats is an end-to-end SQL business analytics and relational database design project built for a multi-branch café chain operating across multiple locations in Sydney, Australia.\n\nThis project demonstrates how structured relational databases and SQL-driven analytics can support operational decision-making in a retail hospitality environment.\n\nThe project combines:\n\n* Relational database design\n* Business-focused SQL analytics\n* Operational performance analysis\n* Customer behaviour analytics\n* Revenue and profitability reporting\n* Staff scheduling optimisation\n* Branch-level operational efficiency analysis\n\nThe analysis simulates real-world café operations and demonstrates how businesses can use SQL and data analytics to improve profitability, customer retention, staffing efficiency, and operational reliability.\n\n---\n\n# 🧰 Tech Stack\n\n* SQL (MySQL)\n* MySQL Workbench\n* Relational Database Design\n* ERD Modelling\n* Business Analytics\n* Operational Analytics\n* Business Intelligence\n* Data Modelling\n* Database Normalisation\n* KPI Analysis\n\n---\n\n# 📂 Repository Structure\n\n```bash\nurban-eats-sql-analysis/\n│\n├── README.md\n├── LICENSE\n├── .gitignore\n│\n├── assets/\n│   ├── available_products_by_outlet.png\n│   ├── failed_payment_and_churn_analysis.png\n│   ├── loyal_vs_onetimer_customers.png\n│   ├── order_to_revenue_flow_analysis.png\n│   ├── product_sales_by_outlet.png\n│   ├── reservation_reliability_analysis.png\n│   ├── revenue_by_product_category.png\n│   ├── role_group_demand_analysis.png\n│   ├── shift_utilisation_analysis.png\n│   ├── staff_capacity_by_outlet.png\n│   ├── total_revenue_by_outlet.png\n│   ├── underperforming_categories_analysis.png\n│   └── urban_eats_erd.pdf\n│\n├── diagrams/\n│   └── urban_eats_erd.pdf\n│\n├── reports/\n│   ├── urban_eats_report.docx\n│   └── urban_eats_report.pdf\n│\n├── sql/\n│   ├── schema/\n│   │   └── schema.sql\n│   │\n│   ├── data_insertion/\n│   │   └── data_insertion.sql\n│   │\n│   └── analysis/\n│       └── business_case_analysis.sql\n│\n└── data/\n````\n\n---\n\n# 🗃️ Simulated Operational Dataset\n\nThe project uses a synthetic but business realistic dataset simulating day to day café operations across multiple outlets.\n\nThe dataset includes:\n\n* 3 café outlets\n* 30+ customers\n* 30+ menu products\n* Staff and shift allocation\n* Customer reservations\n* Orders and payments\n* Product availability by branch\n* Revenue and transaction records\n\nThe operational data was intentionally designed to simulate:\n\n* Repeat vs one time customers\n* Customer churn signals\n* Failed and refunded payments\n* Reservation no shows\n* Staffing inefficiencies\n* Branch specific menu strategies\n* Operational bottlenecks\n\n---\n\n# 🧠 Database Design \u0026 ERD\n\nThe relational database schema was designed using proper entity relationships, primary keys, foreign keys, and many to many junction tables.\n\n### Core Entities\n\n* Outlet\n* Customer\n* Product\n* Product_Category\n* Orders\n* Payments\n* Reservation\n* Staff\n* Shift\n\n### Junction Tables\n\n* Order_Product\n* Outlet_Product\n* Staff_Shift\n\nThe schema supports both transactional processing and business analytics reporting.\n\n---\n\n# 🧩 Entity Relationship Diagram (ERD)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/urban_eats_erd.pdf\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n---\n\n# 🧠 SQL Concepts Demonstrated\n\nThis project demonstrates practical SQL analytics and database engineering concepts including:\n\n* Complex JOIN operations\n* Aggregate functions\n* CASE statements\n* GROUP BY and HAVING clauses\n* Revenue calculations\n* Customer segmentation\n* Operational KPI analysis\n* Many to many relationship modelling\n* Foreign key constraints\n* Relational schema design\n* Business rule implementation\n* Business focused SQL reporting\n* Query optimisation logic\n\n---\n\n# 📈 Key Business Metrics Analysed\n\nThe project analyses several operational and commercial KPIs including:\n\n* Revenue by outlet\n* Revenue by product category\n* Reservation completion rate\n* Customer loyalty segmentation\n* Failed payment analysis\n* Staff utilisation percentage\n* Shift efficiency\n* Menu item profitability\n* Product availability ratio\n* Branch operational performance\n\n---\n\n# 📊 Business Concerns \u0026 Analytical Insights\n\n---\n\n# 1️⃣ Sales \u0026 Profitability Analysis\n\n## Focus\n\nAnalyse revenue contribution across outlets and product categories to identify profitability drivers and operational gaps.\n\n## Key Insights\n\n* Urban Eats Central generated the highest overall revenue with balanced sales across meals, beverages, and desserts.\n* Harbour performed strongly through its niche strategy focused on cold drinks and desserts.\n* Campus significantly underperformed due to high cancellation rates and limited product diversity.\n* Espresso based products showed low profitability contribution compared to higher ticket meal categories.\n\n## Revenue by Product Category\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/revenue_by_product_category.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n## Revenue by Outlet\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/total_revenue_by_outlet.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n---\n\n# 2️⃣ Customer Retention Analysis\n\n## Focus\n\nEvaluate customer loyalty, churn risk, reservation reliability, and payment behaviour.\n\n## Key Insights\n\n* Customer loyalty exists but is concentrated within limited product categories.\n* Failed and refunded payments strongly overlap with reservation no shows.\n* Harbour achieved the strongest reservation to order conversion rates.\n* Campus demonstrated poor customer reliability and retention performance.\n\n## Loyal vs One Time Customers\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/loyal_vs_onetimer_customers.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n## Failed Payment \u0026 Churn Analysis\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/failed_payment_and_churn_analysis.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n---\n\n# 3️⃣ Menu Optimisation Analysis\n\n## Focus\n\nIdentify underperforming menu items and evaluate outlet level sales distribution.\n\n## Key Insights\n\n* Several products generated consistently low sales volume.\n* Harbour performed strongly with desserts and cold beverages.\n* Central maintained balanced menu performance.\n* Campus lacked sufficient menu diversity to maximise customer demand.\n\n## Underperforming Categories\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/underperforming_categories_analysis.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n## Product Sales by Outlet\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/product_sales_by_outlet.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n---\n\n# 4️⃣ Staff Scheduling \u0026 Performance Analysis\n\n## Focus\n\nAssess staffing efficiency, shift utilisation, and role allocation across outlets.\n\n## Key Insights\n\n* Central maintained balanced staffing coverage but showed signs of occasional overstaffing.\n* Harbour required stronger barista allocation due to beverage heavy demand.\n* Campus suffered from under utilised staffing and unstaffed shifts.\n* Several staffing gaps directly impacted service reliability and revenue generation.\n\n## Shift Utilisation Analysis\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/shift_utilisation_analysis.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n## Staff Capacity by Outlet\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/staff_capacity_by_outlet.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n## Role Group Demand Analysis\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/role_group_demand_analysis.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n---\n\n# 5️⃣ Branch Level Operational Efficiency\n\n## Focus\n\nEvaluate operational reliability using menu availability, reservation conversion, and end to end revenue flow.\n\n## Key Insights\n\n* Central operated as the strongest overall branch with balanced operational performance.\n* Harbour performed efficiently within its niche strategy.\n* Campus showed operational bottlenecks despite having demand potential.\n* Product availability and reservation reliability strongly influenced branch performance.\n\n## Product Availability by Outlet\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/available_products_by_outlet.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n## Reservation Reliability Analysis\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/reservation_reliability_analysis.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n## Order to Revenue Flow Analysis\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/order_to_revenue_flow_analysis.png\" width=\"850\"/\u003e\n\u003c/p\u003e\n\n---\n\n# 💼 Business Value Delivered\n\nThis project demonstrates how SQL analytics and relational databases can support:\n\n* Operational decision making\n* Revenue optimisation\n* Customer retention strategy\n* Workforce planning\n* Service reliability analysis\n* Menu engineering\n* Branch performance monitoring\n* Business intelligence reporting\n\nThe project reflects how hospitality and retail organisations can use structured analytics to improve commercial performance and operational efficiency.\n\n---\n\n# ⚙️ How to Run the Project\n\n## Step 1 — Clone Repository\n\n```bash\ngit clone \u003crepository-link\u003e\n```\n\n---\n\n## Step 2 — Create Database\n\nCreate a new MySQL database using MySQL Workbench.\n\n---\n\n## Step 3 — Execute Schema Script\n\nRun:\n\n```sql\nsql/schema/schema.sql\n```\n\nThis creates all relational tables and constraints.\n\n---\n\n## Step 4 — Populate Operational Data\n\nRun:\n\n```sql\nsql/data_insertion/data_insertion.sql\n```\n\nThis inserts the simulated business dataset.\n\n---\n\n## Step 5 — Run Business Analytics Queries\n\nRun:\n\n```sql\nsql/analysis/business_case_analysis.sql\n```\n\nThis executes all business concern analyses and KPI queries.\n\n---\n\n# 🎯 Key Learnings\n\nThrough this project, I strengthened my skills in:\n\n* Relational database design\n* SQL analytics\n* Operational KPI analysis\n* Customer behaviour analysis\n* Data modelling\n* Business focused reporting\n* Translating business problems into SQL solutions\n* Designing analytical workflows for operational decision making\n\n---\n\n# 🚀 Future Enhancements\n\nPotential future improvements include:\n\n* Power BI dashboard integration\n* Tableau visualisations\n* Demand forecasting using Python\n* Customer churn prediction models\n* Automated reporting pipelines\n* Cloud deployment using AWS RDS or Azure SQL\n* Stored procedures and triggers\n* Real time operational monitoring\n\n---\n\n# 📑 Conclusion\n\nUrbanEats demonstrates how relational databases and SQL analytics can be used to solve real world operational and commercial business problems.\n\nThe project successfully combines:\n\n* Database engineering\n* SQL analytics\n* Business intelligence\n* Operational analytics\n* Strategic business recommendations\n\nThe analysis highlights clear operational differences between branches while providing actionable insights for improving profitability, staffing efficiency, customer retention, and service reliability.\n\nThis project reflects a practical, business focused approach to data analytics and demonstrates industry relevant SQL and database skills applicable to retail, hospitality, and operational analytics environments.\n\n---\n\n# 👨‍💻 Author\n\n### Muntasir Md Nafis\n\nBusiness Analytics graduate with a Computer Science and Engineering background specialising in SQL analytics, operational analytics, and business intelligence.\n\n### Areas of Interest\n\n* Data Analytics\n* Business Intelligence\n* SQL Analytics\n* Operational Analytics\n* Predictive Analytics\n* Retail \u0026 Customer Analytics\n* Data Visualisation\n* Business Reporting\n\nGitHub: [https://github.com/nafis2508](https://github.com/nafis2508)\n\n---\n\n# 📜 License\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafis2508%2Furban-eats-sql-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnafis2508%2Furban-eats-sql-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafis2508%2Furban-eats-sql-analysis/lists"}