Writing a query
Refer to tables and columns by their identifiers, not their display names. You can find a table’s identifier in its Settings tab, and copy a column’s from its Column options menu. Every table in the workspace can be queried by its identifier, including platform tables, so you can join across them freely.What’s allowed
Each query must be exactly one statement.Writing data with SQL
The table’s search bar only reads data.INSERT, UPDATE and DELETE run only in these places:
- Query Table node: turn on Allow an INSERT statement, Allow an UPDATE statement or Allow a DELETE statement under Advanced options. All three are off by default. See Tables in Flows.
- Agents: turn on Allow edits for the table.
UPDATEandDELETEmust include aWHEREclause. See Tables in Agents. - Genie: changes to data ask for your approval first. See Tables with Genie.
Limits
- Timeout: a query is cancelled after 10 seconds.
- Row cap: a query returns at most 10,000 rows. Extra rows are dropped without an error, so add
LIMITandORDER BYto control which rows you get. The search bar’s SQL mode pages through results and isn’t affected. - Concurrency: a workspace runs a few queries at once and queues the rest. If no capacity frees up in time, the query is not run and you get an error asking you to try again.
- Rate limit: in the app, 5 queries per second per user. Through the API, 10 per second per workspace by default.
Common errors
Common errors