An interviewer-facing SQL surface for the retail transaction case study.
Built with Datasette Lite and SQLite to provide a browser-based, zero-setup environment for live KPI checks, rollups, and ad hoc SQL discussion.
- ERP-style retail transaction structure and grain (Kaggle source)
- 1,000 transaction line items (one row = one product-level line)
- Source CSV:
Sales Data.csv - Demo database:
retail_transactions_demo.db
The database includes:
transactions- raw imported rows from the CSVworking_transactions- working-layer KPI driver columns (month, revenue, flags)- KPI views for interview walkthroughs:
kpi_checks_summary(Checks)kpi_monthlykpi_channelkpi_status_distribution
The browser interface is read-only.
Open in a browser without setup:
https://wgudataninja.github.io/retail-transactions-sql-explorer/
If you open the local index.html, serve the folder over HTTP first. Datasette Lite
cannot load a file:// SQLite URL directly from the browser.
Example queries used for demonstrations are in:
SQL_DEMO.md
Use the included CORS-enabled file server:
python3 serve_demo.pyThen open http://127.0.0.1:8000.
Direct Datasette Lite URL pattern:
https://lite.datasette.io/?url=http%3A%2F%2F127.0.0.1%3A8000%2Fretail_transactions_demo.db&metadata=http%3A%2F%2F127.0.0.1%3A8000%2Fmetadata.json&install=datasette-render-html#/retail_transactions_demo
To rebuild the demo database from Sales Data.csv:
python3 build_demo_db.py