Prisma · Schema

AggregateResult

Result of an aggregation operation

Properties

Name Type Description
_count object Count of records or field-level counts
_avg object Average values for numeric fields
_sum object Sum of numeric field values
_min object Minimum values per field
_max object Maximum values per field
View JSON Schema on GitHub

JSON Schema

prisma-aggregateresult-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AggregateResult",
  "title": "AggregateResult",
  "type": "object",
  "description": "Result of an aggregation operation",
  "properties": {
    "_count": {
      "type": "object",
      "description": "Count of records or field-level counts",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "_avg": {
      "type": "object",
      "description": "Average values for numeric fields",
      "additionalProperties": {
        "type": "number"
      }
    },
    "_sum": {
      "type": "object",
      "description": "Sum of numeric field values",
      "additionalProperties": {
        "type": "number"
      }
    },
    "_min": {
      "type": "object",
      "description": "Minimum values per field",
      "additionalProperties": true
    },
    "_max": {
      "type": "object",
      "description": "Maximum values per field",
      "additionalProperties": true
    }
  }
}