{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "agg",
  "name" : "count",
  "description" : "Returns the total number (count) of input values.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "field",
          "type" : "boolean",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "cartesian_point",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "date",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "double",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "geo_point",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "integer",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "ip",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "keyword",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "long",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "text",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "unsigned_long",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "version",
          "optional" : true,
          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    }
  ],
  "examples" : [
    "FROM employees\n| STATS COUNT(height)",
    "FROM employees\n| STATS count = COUNT(*) BY languages\n| SORT languages DESC",
    "ROW words=\"foo;bar;baz;qux;quux;foo\"\n| STATS word_count = COUNT(SPLIT(words, \";\"))",
    "ROW n=1\n| WHERE n < 0\n| STATS COUNT(n)",
    "ROW n=1\n| STATS COUNT(n > 0 OR NULL), COUNT(n < 0 OR NULL)"
  ],
  "preview" : false,
  "snapshot_only" : false
}
