The SQL Query field type runs a SQL statement and displays the result. It's a display-only field — the user can't edit it; the value is computed every time the row is rendered.
Conditional options
- MySQL Query to Run (Required) — the SQL to execute.
##AMDATA_ID##will be replaced with the ID of the data row. Other field tokens (##AMDATA_fieldname##) are also substituted before execution.
What gets shown
The first column of the first row returned by the query. For multi-row or multi-column output, format your SQL accordingly — for example wrap in GROUP_CONCAT() to flatten multiple rows into one cell.
Use sparingly
Every render of a row that contains an SQL Query field runs an extra query. For browse views displaying many rows, this can be costly. Prefer regular columns + computed display formats where possible.