#docs #tql

Group By Query

Groups a set of events by a set of dimensions and aggregates them by a set of metrics.

A group by query can group arbitrary values using aggregations and post-aggregations. This is slightly more complicated than the Top N query, but allows you more flexibility and more complex queries.

Example

{
  "aggregations": [
    {
      "fieldName": "count",
      "name": "Number of Signals",
      "type": "longSum"
    }
  ],
  "dataSource": "telemetry-signals",
  "dimensions": [
    {
      "dimension": "majorSystemVersion",
      "outputName": "Major System Version",
      "outputType": "STRING",
      "type": "default"
    }
  ],
  "filter": {
    "dimension": "appID",
    "type": "selector",
    "value": "AAABBBCCC"
  },
  "granularity": "all",
  "queryType": "groupBy"
}

Properties

All default properties and the following properties are supported:

PropertyDescription
dimensionsA list of DimensionSpec objects to do the groupBy over.