Apple Global Sales — End-to-End SQL
Tools: MySQL · SQL scripts (schema → load → clean → analyse)
This is deliberately “analyst engineering”: not a single ad-hoc query, but a repeatable database
story. The repo walks from CREATE TABLE with sensible types and constraints through
LOAD DATA, cleaning passes (UPDATE, TRIM,
NULLIF), then layered analysis on 11,500 rows and
27 columns spanning regions, channels, discounts, returns, and customer segments
(Kaggle-based Apple global sales dataset).
I answered 30 structured business questions grouped by theme — sales performance,
geography, product mix, customer behaviour, returns/ratings, and advanced window logic (rolling
revenue, ranked products per region, running totals by channel). The proof is in numbered SQL files
so a reviewer can open 05_business_q1_q5.sql … 10_business_q26_q30.sql and
follow the narrative in order.
On top of queries, the project ships reusable views (monthly revenue, category KPIs, regional summary, customer scorecard, channel performance) and five stored procedures parameterised for year, category, date range, region, and channel — the kind of layer you would hand to BI or ops instead of re-writing the same SQL every Monday.