# Get Column Stats

### Overview

This procedure is used to calculate an aggregate value for a table column. It can be used to apply a function to a column and get its sum, mean, average, count, minimum, maximum, standard deviation, or sample variance.

### Input Concepts

| Concept              | Type           | Description                                                                                                                      | Default    | Required |
| -------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------- |
| `column`             | table's column | The column to perform the aggregation on.                                                                                        | No default | Yes      |
| `aggregate function` | string         | The function to use for aggregation. Valid options are: `sum`, `mean`, `average`, `count`, `min`, `max`, `median`, `std`, `var`. | No default | Yes      |

### Output Concepts

| Concept           | Description                    |
| ----------------- | ------------------------------ |
| `aggregate value` | The result of the aggregation. |

### Examples

In the following examples, `the column` refers to the `Amt` column in the table below.

| Amt | Min | Max |
| --- | --- | --- |
| 100 | 10  | 30  |
| 200 | 5   | 500 |

Note: This sample table can be generated using the `create an integer table` procedure.

#### 1. Get the Column Count

{% tabs %}
{% tab title="Automation" %}

```
get the column's count
```

{% endtab %}

{% tab title="Results" %}
2
{% endtab %}
{% endtabs %}

#### 2. Get the Column Average

{% tabs %}
{% tab title="Automation" %}

```
get the column's average
```

{% endtab %}

{% tab title="Results" %}
150.0
{% endtab %}
{% endtabs %}

#### 3. Get the Column's Maximum

{% tabs %}
{% tab title="Automation" %}

```
get the column's max
```

{% endtab %}

{% tab title="Results" %}
200
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/automation-areas/tables-v2/get-a-column/get-column-stats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
