NL→SQL Analytics Engine
Ask a business question in English — the engine writes safe SQL and charts the answer
16,532-row warehouse
by Harshith Bandari
Overview
Ask in English
Segments & Geography
Under the Hood

Revenue by Category

Generated from revenue by category — Electronics dominates the book

Revenue by Channel

Share of GMV by sales channel

Monthly Revenue Trend

All-time GMV by month — seasonality with a Nov/Dec lift

Average Order Value by Channel

Basket size is steady across channels

Key Findings

Click a question — the engine parses it, generates SQL, and renders the result.

—

Revenue by Customer Segment

revenue by segment

Revenue by Country

revenue by country — where the money comes from

Orders by Status

orders by status

Units Sold by Category

units sold by category

How a question becomes SQL

English question→ detect metric + dimension + filters→ resolve minimal JOINs→ render SQL→ safety guardrails→ result + chart
A deterministic, schema-aware parser — no black-box LLM — so every query is transparent and unit-tested (— tests, all passing).

Safety Layer — unsafe queries are rejected before they touch the database

Read-only by design: DDL/DML keywords and stacked statements are blocked
Query attemptedEngine verdict

Automatic LIMIT injection

An unbounded query can't return the whole warehouse
Caller ran:
Engine executed:
Built by Harshith Bandari · Deterministic NL→SQL engine (Python + SQLite) with a validated read-only safety layer · full source, CLI, Streamlit app & tests in the GitHub repoEVERY NUMBER = A REAL ENGINE QUERY
Synthetic warehouse modeled on the public Online Retail II (UCI) & Olist datasets · dashboard values are produced by running the questions above through the engine (Python → data.js → this page)