Skip to main content
The following query computes the average value over a specific field:
Expected Response
See the Tantivy documentation for all available options.

SQL Average Syntax

SQL’s AVG syntax is supported in beta. To enable it, first run
With this feature enabled, the following query is equivalent to the above and is executed in the same way.
SQL
By default, AVG ignores null values. Use COALESCE to include them in the final average:
SQL