Project 02 Analytics · SQL · Cloud · AI/ML

FoodEx · Food
Delivery Data Warehouse

Designed and built an end-to-end analytics platform on top of a food delivery MySQL database — from OLTP schema design and SQL analytics through to Azure Synapse, dbt transformations, Power BI dashboards, and Azure ML models.

★ View full code on GitHub ← Main portfolio Connect on LinkedIn
9
DB Tables
9+
SQL Queries
5
Power BI Pages
4
AI / ML Models
80+
Sample Orders
Tech stack
Built end-to-end

Every layer from raw OLTP transactions to AI predictions.

MySQL 8.0 T-SQL Azure Synapse Analytics Azure Data Factory Power BI · DAX · RLS dbt Core Azure Machine Learning Python · Prophet · XGBoost Azure Cognitive Services GitHub Actions CI/CD
Architecture
Medallion data pipeline

Raw MySQL data flows Bronze → Silver → Gold into Synapse, then into Power BI and Azure ML — the same pattern used in production at MTA.

🛵
MySQL OLTP
9 tables: Orders, Customers, Restaurants, Menus, Delivery Execs, Payments, Feedback, Address, FDP
🔄
Azure Data Factory
Watermark-based CDC every 15 min. Incremental loads to ADLS Gen2. Same ADF patterns from MTA migration work.
🥉→🥇
ADLS Gen2 + dbt
Bronze (raw Parquet) → Silver (cleansed, typed) → Gold (star schema). Schema tests on every model.
🏛️
Azure Synapse
FactOrders + 6 dimension tables. SCD Type 2 on DimCustomer. Columnstore indexes, hash distribution.
📊
Power BI
5 dashboards. Advanced DAX, RLS, incremental refresh — consistent with PL-300 certified approach.
🤖
Azure ML
Prophet demand forecasting, XGBoost churn, ETA regression, Azure Cognitive Services sentiment.
What's built
Every layer, from scratch

Designed as a standalone project that mirrors real enterprise data engineering work.

OLTP schema design
9 normalized tables with FK constraints, audit triggers (BEFORE UPDATE logs all Customer changes to Customer_updated), and stored procedures for inactive customer identification.
ETL pipeline
ADF pipelines with watermark CDC, same architecture used in the MTA 12-source ERP integration. dbt handles all Bronze→Silver→Gold with not_null, unique, and accepted_values tests.
SQL analytics (9 queries)
Cuisine frequency, top-5 demand zones, day-of-week distribution, payment method split, customer acquisition MoM, bounce rate, inactive customer list, exec timeline, performance scoring.
Power BI dashboards
5 pages with advanced DAX (on-time delivery %, bounce rate, AOV), row-level security by region, and incremental refresh — consistent with PL-300 certified patterns.
Star schema (Synapse)
FactOrders + DimCustomer (SCD Type 2), DimRestaurant, DimMenuItem, DimDeliveryExec, DimAddress, DimDate. Hash distributed on customer_key, columnstore indexed.
AI / ML models
Demand forecasting (Prophet), churn prediction (XGBoost, same stack used in Independent Practice), delivery ETA regression, and review sentiment via Azure Cognitive Services.
SQL analytics
9 business queries

Each answers a real operational question for a food delivery business.

Cuisine frequency
Which cuisines drive the most orders?
Orders
Top 5 demand locations
Where to hire more delivery executives?
Orders
Orders by day of week
When do we need peak staffing?
Orders
Payment method split
COD vs. online — where to invest?
Orders
Customer acquisition MoM
Individual vs. business customer growth?
Customer
Customer bounce rate
% who registered but never ordered?
Customer
Inactive customer list
Who to target for re-engagement?
Customer
Delivery exec timeline
Prep time vs. ride time vs. expected ETA?
Delivery
Exec performance scoring
1–5 star score per exec based on delay minutes
Delivery
customer_bounce_rate.sql
-- What % of registered customers never placed a single order?
SELECT
    ROUND(
        COUNT(CASE WHEN c.cust_id NOT IN (
            SELECT o.`cust_id(FK)` FROM `Order` o
        ) THEN 1 END) * 100.0
        / COUNT(c.cust_id),
    2) AS bounce_rate_pct
FROM Customer c
WHERE c.cust_user = 1;  -- Active users only

-- Delivery exec performance score (1–5) based on delay vs. expected ETA
SELECT
    de.name,
    ROUND(AVG(MINUTE(TIMEDIFF(
        o.order_delivered_time, o.expected_delivery_time
    ))), 1) AS avg_delay_mins,
    CASE
        WHEN AVG(MINUTE(TIMEDIFF(o.order_delivered_time, o.expected_delivery_time))) <= 0   THEN 5
        WHEN AVG(MINUTE(TIMEDIFF(o.order_delivered_time, o.expected_delivery_time))) <= 10  THEN 4
        WHEN AVG(MINUTE(TIMEDIFF(o.order_delivered_time, o.expected_delivery_time))) <= 20  THEN 3
        ELSE 1
    END AS performance_score
FROM `Order` o
JOIN Delivery_Exec de ON o.`delivery_exec_id(FK)` = de.delivery_exec_id
JOIN Feedback f ON o.order_id = f.`order_id (FK)` AND f.rated_person = 'D'
GROUP BY de.delivery_exec_id, de.name
ORDER BY avg_delay_mins ASC;
AI / Machine learning
Four models in production

Built using the same Azure ML stack and Python libraries used in the Independent Practice consulting work — Prophet, XGBoost, Random Forest, and Azure Cognitive Services.

Prophet
Demand forecasting
Predicts hourly order volume per city and cuisine type. Pre-positions delivery executives before peak hours. ~18% improvement over baseline — mirrors consulting project results.
XGBoost
Churn prediction
Scores every customer's churn probability using recency, frequency, delivery ratings, and Free Delivery Pass subscription status. Tracked via MLflow.
Gradient Boosting
Delivery ETA
Predicts real delivery time from distance, time of day, restaurant type, and exec current workload. Powers live ETA displayed in the app.
Azure Cognitive
Review sentiment
Azure Text Analytics on Feedback.comments — extracts food quality, service, and delivery aspect-level sentiment scores for the Power BI AI Insights dashboard.
PP
Pratik N. Pawar
Senior Data & AI Analyst · PL-300 Certified
Jersey City, NJ · Open to opportunities
View full portfolio Connect on LinkedIn ✉ pawarrpratik91@gmail.com