02.5 Run your own SQL (SQL editor)
Write a query, run it on one of the workspace's connections and see the rows. Read-only, one statement at a time, and every run is recorded. For checking data and answering a one-off question; for anything you'll come back to, build a dataset.
The SQL editor runs a query you write, on a database the workspace is connected to, and shows the rows. Use it to check what’s in a table, try a calculation before building it into a dataset, or answer a one-off question.
Who can use it
People whose role has the sql:run permission. By default that’s Super Admin and the company admin role. An admin can give it to other roles in Master Settings. Without it, the page isn’t in the menu, and running a query is refused.
Where to find it
In the left menu, under Data sources, click SQL editor (the icon with a prompt, >_).
Run a query
-
Connection and Database: where to run it. Only this workspace’s connections are listed.
-
Rows: how many rows to show, up to 500 by default and 5,000 at most.
-
Write the query, e.g.
-- orders per status SELECT order_status, COUNT(*) AS orders, SUM(total_amount) AS total FROM orders GROUP BY order_status ORDER BY orders DESC; -
Click Run, or press Ctrl+Enter (⌘+Enter on a Mac).
Above the rows you’ll see how many came back and how long the query took, e.g. 4 rows · 621 ms. If there were more rows than the limit, it says First 500 rows… there are more. Raise Rows or narrow the query.
Write the query in your database’s own SQL (Postgres, MySQL, SQL Server…), not the formula language. Your connection, database, query and row limit are remembered in this browser for next time.
What it runs, and what it refuses
| Reading queries only | SELECT, WITH … SELECT, VALUES. INSERT, UPDATE, DELETE, CREATE, DROP and the like are refused: The SQL editor only runs queries that read (SELECT, WITH, VALUES) — DELETE would change the database. The connection itself is read-only too, so a change hidden inside a WITH is stopped as well |
| One statement at a time | Two queries separated by ; are refused: One statement at a time — run each query on its own. A ; at the end is fine |
| Comments | -- … and /* … */ are fine; they’re removed before the query is sent |
| Time | A query that runs longer than 2 minutes is stopped |
| Errors | When the database refuses a query, you see its own message, e.g. column “nope” does not exist |
Every run is recorded
Each run is kept: who ran it, on which connection and database, the query as it was sent, how many rows came back, how long it took, and the error if it failed. The SQL editor is the one place a person’s own SQL reaches a database, so there’s always a record of it.
When to use something else
- To use the result in reports or dashboards: build a dataset. Datasets are saved, reusable, filtered by your reports, and checked for you.
- To copy rows into another table: use a move.
Next: 03.1 What a dataset is
Last updated 18 October 2026