Query

SQL notebooks that commit like source

A .pgsql file holds SQL cells and markdown in one editor tab. Run one cell or the whole notebook, and results, charts and exports appear inline. The file is plain text, so it commits like any other source file.

Free

A .pgsql notebook in VS Code showing query results in a grid, with the SQL Assistant open beside it
A notebook with results in a grid, and the SQL Assistant beside it.

How you use it

  1. Create a notebook bound to a connection

    Choose New Notebook, then pick a connection and database. The file lives in your repo as query.pgsql.

  2. Write SQL with schema-aware completions

    Completions come from your live catalog: tables, columns and functions. Ctrl+Enter runs the active cell.

    SELECT date_trunc('day', created_at) AS day,
           COUNT(*) AS orders
    FROM orders
    GROUP BY day;
  3. Read results below the cell

    Results show in a sortable grid with column stats. You can edit cells in the grid and commit with explicit SQL. Large results stream in.

  4. Export or save the query

    Export CSV, JSON or Excel from the result footer. Save Query adds it to the Saved Queries sidebar with its connection.

Key facts

  • Plan: Free
  • Write and run cells
  • Inline results and charts
  • CSV, JSON and Excel export
  • Query history and saved queries