Forum Discussion
Introduction to Elastic: Ep.9 - ES|QL
- 6 months ago
You filter for the relevant trips, but don't create an overall sum, but use the formula used in a question before to calculate the average speed per trip. Then do a sum of these and divide it by the number of results. You can count the number of results manually, or with STATS.
https://www.elastic.co/docs/reference/query-languages/esql/commands/processing-commands#esql-stats-by
You filter for the relevant trips, but don't create an overall sum, but use the formula used in a question before to calculate the average speed per trip. Then do a sum of these and divide it by the number of results. You can count the number of results manually, or with STATS.
https://www.elastic.co/docs/reference/query-languages/esql/commands/processing-commands#esql-stats-by