Metric aggregations

Metric aggregations work on numerical fields. They compute the aggregate value of a numerical field in the given context. For example, let's suppose that we have a table containing the results of a student's examination. Each record contains marks obtained by the student. A metric aggregation can compute different aggregates of that numerical score column. Some examples are sum, average, minimum, maximum, and so on.

In SQL terms, the following query gives a rough analogy of what a metric aggregation may do:

SELECT avg(score) FROM results;

This query computes the average score in the given context. Here, the context is the whole table, that is, all students.

Metric aggregation can be placed on the top or outermost level in the aggregations query. Metric aggregations can also be nested inside bucket aggregations. Metric aggregations cannot nest other types of aggregations inside of them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.131.213