SQL query
An SQL query, or Definition query, can be applied to any vector layer and is used to limit which features are visible to the end user.
If a Definition query is set for a layer, the end user will only see the features that meet the query condition. This applies to the map display, the attribute table, and all dashboards built on this layer. The same layer can have different definition queries in different projects.
To set up a definition query, click the three dots next to the layer name and select “Properties” (see Figure 1), then click “SQL query” at the bottom of the modal window (see Figure 2). This opens the query builder (see Figure 3). In the builder, you can create an expression that limits the number of displayed features. For convenience, you can select fields, field values, as well as functions and operators for the expression. Once the expression is ready, click “Check” and, after a successful check, save it.
If a definition query is set for a layer, the app author will see a red indicator next to the layer.


