Aggregate functions perform a computation against a set of = values to generate a single result. For example, you could use an aggregate= function to compute the average (mean) order over a period of time. Aggreg= ations can be applied as standard functions or used as part of a transform = step to reshape the data.

**Aggregate across an entire column:**

```
derive type:single value:AVERAGE(Sco=
res)
```

`Scores`

column.
=20
`pivot value: AVERAGE(Score) limit: 1`

**Output: **Generates a single-column table with a sin=
gle value, which contains the average of all values in the ```
Score=
s
```

column. The limit defines the maximum number of columns that can b=
e generated.

**NOTE: **When aggregate functions are applied as part of a=
`pivot`

transform, they typically involve multiple parameters a=
s part of an operation to reshape the dataset. See below.

**Aggregate across groups of values within a column:**

Aggregate functions can be used with the `pivot`

tr=
ansform to change the structure of your data. Example:

```
pivot group: StudentId value: AVERAGE(Score) limi=
t: 1
```

In the above instance, the resulting dataset contains two columns:

`studentId`

- one row for each distinct student ID valu= e`average_Scores`

- average score by each student (`stud= entId`

)

**NOTE:** You cannot use aggregate functions inside of cond=
itionals that evaluate to `true`

or `false`

.

A pivot transform can include multiple aggregate functions and group&nbs= p;columns from the pre-aggregate dataset.

For more information on the transform, see Pivot Transform.

These aggregate functions are available: