
If you’ve used Jupyter notebooks for Python, you already know the concept. Cells of code mixed with documentation. Run them individually or all at once. See results inline.
DBCode brings the same idea to SQL.
A SQL notebook is a file with cells. Each cell is either SQL or markdown. You write a query, run it, and see results right below the cell. Add a markdown cell to explain what the query does. Run the whole notebook top to bottom, or pick individual cells.

You could. But .sql files are flat. You run the whole thing or nothing. You can’t mix documentation with queries. You can’t see results next to the query that produced them.
Notebooks give you:

Onboarding. New dev joins the team? Hand them a notebook that walks through the schema. “Here’s the users table. Here’s how orders connect to products. Here’s the query to find active subscriptions.”
Incident investigation. Something’s wrong in production. Open a notebook, write queries to check different tables, add notes about what you find. When you’re done, you have a documented investigation you can share.
Reporting. Weekly metrics? Build a notebook. Run it every Monday. Results right there next to the queries.
Learning SQL. Teaching someone SQL? Notebooks let them read the explanation, run the query, see the result. All in one place.
Works with all 50+ databases DBCode supports. Postgres, MySQL, MongoDB, Snowflake, whatever you’re running.
Try it: https://dbcode.io/docs/notebooks