8 Best SQL Notebooks: Free Tiers and Databases Compared

· 13 MIN

TL;DR: For a free local SQL notebook on any database, use Jupyter with JupySQL or marimo. For SQL Server, the MSSQL extension for VS Code now has GA SQL notebooks (Azure Data Studio was retired on February 28, 2026). For a hosted team notebook with a usable free tier, Deepnote or Hex. If your data already sits in Databricks, BigQuery or Snowflake, use the notebook built into that platform.

A SQL notebook is a document made of cells where you write SQL, run it against a database, and see the result table directly under the query, with Markdown notes, charts and often Python in the same file. It differs from a SQL editor because the queries, their results and the reasoning around them are saved together, so the analysis can be rerun and shared top to bottom. The right SQL notebook depends on two things: which databases it can connect to, and what its free tier actually allows. This page compares eight tools on exactly that, with the command or click path to connect each one, using vendor docs and pricing pages checked on November 12, 2026.

How does a notebook built on SQL cells work?

A SQL notebook is an interactive file (usually .ipynb or a tool-specific format) that alternates SQL cells and text cells. Each SQL cell sends its query to a connected database and stores the result next to it. Most notebooks also turn that result into a dataframe, so the next cell can chart it in Python or feed it into another query.

How a SQL notebook turns a query into a shareable analysis
FIG 01 — The query, its output and the explanation live in one file you can rerun.

Typical uses:

How we judged them

Five criteria, weighted toward what decides whether a tool works for you at all:

  1. Databases it connects to: PostgreSQL, MySQL, SQL Server, Snowflake, BigQuery and others, and whether that needs a paid plan.
  2. Free tier: what is genuinely free (editors, projects, compute) and what is gated.
  3. Setup: the exact step to get from install to a first query.
  4. Collaboration and scheduling: sharing, comments, scheduled runs.
  5. Lock-in: whether the notebook is a standard .ipynb or Python file you can take elsewhere.

We left out pure SQL editors (DBeaver, DataGrip, pgAdmin) because they keep query tabs, not notebooks. If you are choosing between those, see our DataGrip alternative comparison.

Summary table

ToolBest forDatabasesFree tierPaid from
Jupyter + JupySQLFree local notebook on any databaseAnything with a SQLAlchemy driverFully free, open sourceFree
marimoReproducible Python + SQL notebooksDuckDB built in; Postgres, MySQL, SQLite, Snowflake, BigQuery via UIFree, open source; free molab cloudFree
VS Code MSSQL notebooksSQL Server and Azure SQL usersSQL Server, Azure SQL, SQL database in FabricFree extensionFree
DeepnoteHosted team notebooks on a budget13+ incl. Postgres, MySQL, Snowflake, BigQuery, Redshift, MongoDB3 editors, 5 projects$39/editor/mo (yearly)
HexNotebooks that become data appsAny data source on all plansCommunity, small compute$36/editor/mo
Databricks notebooksLakehouse data in DatabricksUnity Catalog tables, SQL warehouseFree Edition, serverless onlyUsage-based
BigQuery Studio notebooksData already in BigQueryBigQueryFirst 1 TiB of queries/month$6.25/TiB + runtime
Snowflake NotebooksData already in SnowflakeSnowflake30-day trial, $400 creditsCredit usage
Free tier of each SQL notebook, from the vendor pages
FIG 02 — Checked on vendor pages, November 12, 2026.

1. Jupyter with JupySQL

JupySQL is an open-source Jupyter extension that adds %sql (one line) and %%sql (whole cell) magics, so any Jupyter notebook, JupyterLab or VS Code notebook becomes a SQL notebook. It started as a fork of the older ipython-sql package.

How do I run SQL in Jupyter? Install JupySQL and a driver, load the extension, connect with a URL, then write SQL in a %%sql cell:

%pip install jupysql pandas pyarrow psycopg2-binary --quiet
%load_ext sql
%sql postgresql://user:password@localhost:5432/shop
%%sql
-- customers with no order in the last 90 days
SELECT c.id, c.email, MAX(o.created_at) AS last_order
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.id
GROUP BY c.id, c.email
HAVING MAX(o.created_at) < NOW() - INTERVAL '90 days'
    OR MAX(o.created_at) IS NULL;

%sqlcmd tables lists tables and %sqlcmd columns --table orders lists columns, which saves a trip to a separate client.

The video below walks through the same magics on a DuckDB database, including parameterized queries and saved queries.

VIDEO · I installed JupySQL to see if it really improves Jupyter Notebooks (Learn Data with Mark)

2. marimo

marimo is an open-source reactive notebook for Python where SQL cells are first-class: no magics, and the notebook file stays plain Python. When a cell changes, every cell that depends on it reruns, so results never go stale.

# pip install "marimo[sql]"   then: marimo edit report.py
import marimo as mo
import sqlalchemy

engine = sqlalchemy.create_engine("postgresql://user:password@localhost:5432/shop")
orders = mo.sql(
    "SELECT status, COUNT(*) AS n FROM orders GROUP BY status",
    engine=engine,
)

3. VS Code MSSQL extension SQL notebooks

The MSSQL extension for Visual Studio Code now ships SQL notebooks as a generally available feature: native Jupyter notebooks with an MSSQL kernel, IntelliSense from your live connection and a sortable, filterable results grid. This is the replacement for Azure Data Studio notebooks, since Azure Data Studio was retired on February 28, 2026 and gets no more updates or security fixes (Microsoft Learn).

-- runbook cell: the 5 longest-running active requests
SELECT TOP 5 session_id, status, total_elapsed_time / 1000 AS seconds, command
FROM sys.dm_exec_requests
WHERE session_id <> @@SPID
ORDER BY total_elapsed_time DESC;

4. Deepnote

Deepnote is a hosted, collaborative notebook with native SQL blocks whose results flow straight into Python, charts and interactive apps. It feels like Jupyter with Google Docs-style editing.

5. Hex

Hex is a notebook-based analytics platform where SQL, Python and no-code cells chain together, and any notebook can be published as an interactive data app. SQL cells can query a database or earlier results ("dataframe SQL").

6. Databricks notebooks

Databricks notebooks mix Python and SQL cells (%sql switches a cell's language) against tables in Unity Catalog, running on serverless compute or a SQL warehouse.

7. BigQuery Studio notebooks

BigQuery Studio includes Python notebooks that run on Colab Enterprise runtimes, with SQL cells that can reference Python variables and return dataframes (Google Cloud docs).

8. Snowflake Notebooks

Snowflake Notebooks run Python, SQL and Markdown cells inside Snowsight against your Snowflake data. The current version is Notebooks in Workspaces, a Jupyter-compatible environment with Git integration and a native scheduler. The original experience was renamed Legacy Notebooks, and accounts created after April 2026 cannot create legacy notebooks at all (Snowflake docs).

SQL notebook vs SQL editor: when should you use which?

Use a SQL editor when you are writing, tuning or debugging individual queries; use a SQL notebook when the result, the steps and the explanation need to stay together. Editors such as DBeaver, DataGrip and the plain MSSQL query window are faster for one query at a time and give you execution plans, schema browsing and autocomplete. Notebooks win when someone else must follow or rerun the work.

SQL editorSQL notebook
Unit of workOne query tabA sequence of cells
Results savedUsually notYes, under each cell
Notes and chartsNoMarkdown, charts, Python
Best forQuery tuning, admin, quick lookupsAnalysis, runbooks, reports, handover
SharingShare the .sql fileShare the rerunnable notebook

For query tuning inside either, our EXPLAIN guide for PostgreSQL shows how to read a plan.

How to choose a SQL notebook

When a notebook is the wrong tool

Notebooks assume the person asking the question can write SQL. When the questions come from ops, sales or founders who cannot, every answer still routes through whoever owns the notebook. That is the gap AI for Database fills: people ask in plain English, it writes and runs a read-only query on PostgreSQL, MySQL, SQL Server, BigQuery and other sources, shows the SQL, and can pin the answer to a self-refreshing dashboard or an alert. Keep the notebook for deep analysis; try AI for Database free at aifordatabase.com for the everyday questions.

Frequently Asked Questions

What is a SQL notebook?

A SQL notebook is an interactive document of cells where you write SQL, run it against a connected database and see the result directly below each query, alongside Markdown notes and charts. Jupyter with JupySQL, marimo, Deepnote, Hex and the VS Code MSSQL extension are common examples.

Which SQL notebook tools are free?

Jupyter with JupySQL, marimo and the VS Code MSSQL extension are fully free. Deepnote's Free plan allows 3 editors and 5 projects, Hex Community is free with small compute, Databricks Free Edition is free with a daily quota, and BigQuery includes 1 TiB of free queries per month.

How do I run SQL in Jupyter?

Install JupySQL and a database driver (%pip install jupysql psycopg2-binary), run %load_ext sql, connect with %sql postgresql://user:password@host/db, then put %%sql at the top of a cell and write your query. The result appears as a table below the cell.

What replaced Azure Data Studio notebooks?

Azure Data Studio was retired on February 28, 2026. Microsoft's replacement is the MSSQL extension for Visual Studio Code, whose SQL notebooks feature is generally available and uses standard .ipynb files, so existing notebooks open there.

Can a SQL notebook query PostgreSQL and MySQL?

Yes. JupySQL connects to both through SQLAlchemy drivers, marimo's connection UI supports both, and Deepnote lists both on its Free plan. The VS Code MSSQL notebooks do not; they support only the SQL Server family.

Are SQL notebooks good for dashboards?

They can produce one, but they are built for analysis. Hex and Deepnote can publish a notebook as an app, and Deepnote Team or Hex Team can rerun it on a schedule. For a dashboard non-technical people check daily, a BI tool or a self-refreshing dashboard is usually simpler to keep current.

Ready to try AI for Database?

Query your database in plain English. No SQL required. Start free today.