> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/process-node-parts/get-statistics-from-collection.md).

# Get Statistics from Collection

## Description

The *Get Statistics from Collection* part allows you to pull basic statistics from any data collection. This part allows you to gather from a collection the following statistics: maximum (largest number), minimum (smallest number), average (average number in the collection), number (the count of the collection), and sum (the sum of the collection).

### Node Type

This part is available in process nodes and is located in the *Collections* dropdown menu.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-3c45194b9394c0fffa29e3a61232f9b48a543492%2F6870392b-8527-4800-978d-91499f708983.png?alt=media)

### Used With

This part is available in version 7.4.6, revision 34263 and later, and it works with all frameworks and in standalone applications.

## Editor Fields

| Field Name | Description/Use                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Type/Options | Optional/Mandatory |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------ |
| Collection | This is the collection from which the part will pull statistics.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Data Object  | Mandatory          |
| Key        | <p>The key is the variable in the collection that you want to compare. For example, if your collection looks like the following:<br><img src="https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-43bf019999afee33c6ce7c411327462af99242f7%2F10d9d501-42b6-455d-b1b2-cb86441d78bc.jpg?alt=media" alt=""><br>You can select <em>score</em> as the key about which to get relevant statistics.</p>                                                                                                                                                                                                                                        | Data Object  | Mandatory          |
| Path       | <p>The path is the name of the data object to which the system will write the collection results. The part returns the average, maximum, minimum, count and sum of the key values.<br><img src="https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-2f1671a33cfa1c4314886fb8d0191957de4cf302%2F5251f5f3-50dc-4c6f-bf43-af0d82f72caa.jpg?alt=media" alt=""><br>In Release 8.2+ the results include the key count, which is the number of occurrences of the specified key in the collection. In the abdominal pain example above, the key\_count for <em>qname</em> key should be 1 while key\_count for <em>score</em> should be 2.</p> | Data Object  | Mandatory          |

### Example Project

The *get\_statistics\_from\_collection* part is demonstrated in the *Example* tab of the *How To Guide - Querying Complex Collections* project, available on the Community Portal Shared Workspace (v8.1+) or downloadable from [this](/release-9/example-gallery/how-to-guides/how-to-guide-query-collection.md) article.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/process-node-parts/get-statistics-from-collection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
