# PERSONALITY

### Details

After all answers are evaluated, it will return a group with an entry for each group with its calculated numeric.

### Syntax

**PERSONALITY(table, reducer)**

| Argument name                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>table</strong></p><p>Required</p>   | Table to evaluate with answers groups and points.                                                                                                                                                                                                                                                                                                                                                                        |
| <p><strong>reducer</strong></p><p>Required</p> | <p>Mathematical operation to calculate a final numeric result for each group:<br></p><p><strong>avg</strong> Average of the points of each group.</p><p><strong>count</strong> Number of matching answers of each group.</p><p><strong>sum</strong> Sum of the points of each group.</p><p><strong>max</strong> Maximum answer points of each group.</p><p><strong>min</strong> Minimum answer points of each group.</p> |

### Examples

![mytable](https://1947171238-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LrTaL6FQB3RzlkCwQfN%2F-MA5TCv7kdArVV4XHBJn%2F-MA5Xohnx5PmZciuALEx%2Fimage.png?alt=media\&token=82f94927-6b9f-4664-bbfc-c2bcc4f889b6)

**Inputs**: *a* is true, *c* is true, and *d* is true.

* **PERSONALITY(mytable, 'avg')** will return {g1:1, g2:3}
* **PERSONALITY(mytable, 'count')** will return {g1:1, g2:2}
* **PERSONALITY(mytable, 'sum')** will return {g1:1, g2:6}
* **PERSONALITY(mytable, 'max')** will return {g1:1, g2:4}
* **PERSONALITY(mytable, 'min')** will return {g1:1, g2:2}
