SQLGuard

Ask the warehouse.
Get a number or get a reason.

SQLGuard turns a question in English into SQL, then puts that SQL through a validator gate before a single row is read. Below the confidence threshold it refuses and hands you the draft — rather than a number nobody can check.

or

Demo accessdemo@sqlguard.app / demo1234 — already filled in. Any credentials work, or skip the form entirely.

Live example · the gate holding a queryRefused
ask

What was our net revenue retention for enterprise last quarter?

generated sqlnot executed
1SELECT SUM(r.mrr_usd)
2 / NULLIF(LAG(SUM(r.mrr_usd)) OVER (ORDER BY r.month_start_date), 0) AS nrr
3FROM fct_subscription_revenue r
4JOIN dim_account a ON a.account_id = r.account_id
5WHERE a.segment = 'enterprise'
6GROUP BY r.month_start_date
  • Parsespass
  • Read-onlypass
  • Metric resolvedfail
  • Date filter presentfail
  • No cartesian joinpass
  • EXPLAIN dry-runpass

Net revenue retention is not defined in the semantic layer, and the generated SQL dropped the time bound. The query would have run perfectly.

Gate off1.34returned as “NRR”, all-time, invented formula
Gate onRefuseddraft SQL escalated for a human to check

Demo build on fixtures · no warehouse is connected · tmaslam/sql-guard