NB

SQL notebooks

Free · Core

Notebooks that commit like source.

.pgsql files mix SQL cells and markdown in one editor tab. Run one cell or the whole notebook — results, charts, and export land inline. Git-tracked by default.

All featuresHomepage
1 / 4
workspace / notebooksquery.pgsqlNB

Create a notebook bound to a connection

New Notebook → pick connection and database. The file lives in your repo as query.pgsql — not a separate client export.

CONNECTIONS
orders_prod
orders_dev
public
▸ customers
▸ orders
▸ payments
Cell 1 · pgsql · ready
SELECT date_trunc('day', created_at) AS day,
      COUNT(*) AS orders
FROM orders GROUP BY 1;
7 rows · 12 ms
dayordersrevenue
Apr 07142$18,420
Apr 08158$21,340
Apr 09131$17,890
untitled.pgsql
SELECT … FROM orders
GROUP BY day;
top customers by revenue this quarter

Grounded in customers + orders. Review before running.

Cell 1 · writing…
DEVSTAGEPROD
Risk scoreHIGH

DELETE without WHERE — confirm to continue

customersid · name · email
ordersid · customer_id · total
Designer · Diff · ERD · Import
Seq Scan on orders4 511 ms
Hash Join214 ms
Index Scan (after fix)88 ms
12active
2locks
99.2%cache hit
48msp95
orders_dev · Neon · SSL
orders_stage · SSH tunnel
orders_prod · read-only
Write & runInline resultsExportQuery history