DATA / SQL
SQL Business Analytics
Joins, CTEs and window functions applied to reproducible synthetic retail records.
← All projectsObjective
Check where revenue comes from without double-counting orders or dropping guest purchases.
Tools & architecture
Python, SQLite, SQL, HTML. Seeded generator → constrained SQLite tables → analytical queries → JSON results → standalone dashboard.
Development & challenges
The synthetic dataset has 444 orders and 895 order lines. Aggregate at order level before customer analysis; preserve guest orders with a left join.
Security considerations
Synthetic records avoid publishing customer data. Constraints reject negative prices and nonpositive quantities; money is aggregated in integer cents.
Testing & verification
The October 21, 2026 test record contains five passing checks. Revenue reconciles to $59,578.20 across the synthetic orders.
Outcome & limitations
A reproducible synthetic analysis, not evidence of market growth or client results. Gross profit excludes overhead and fulfillment.
What I learned
The first question is the grain of the data. A plausible chart can hide an incorrect join.
Source code is maintained in my private GitHub repositories.