> For the complete documentation index, see [llms.txt](https://help.pickzen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pickzen.com/guides/nocode/functions/rank.md).

# RANK

### Details

* It can also return a list of groups (columns)
* The columns are chosen using a point-based system.

### Syntax

**RANK(table, \[number])**

| Argument name                                 | Description                                                     |
| --------------------------------------------- | --------------------------------------------------------------- |
| <p><strong>table</strong></p><p>Required</p>  | Table to be evaluated.                                          |
| <p><strong>number</strong></p><p>Optional</p> | Number of groups (columns) to return. By default will return 1. |

**Table syntax**

| **Column name**                                          | Description                                                     |
| -------------------------------------------------------- | --------------------------------------------------------------- |
| <p><strong>key</strong></p><p>Required</p>               | Column with the group keys.                                     |
| <p><strong>\<other\_columns></strong></p><p>Required</p> | Column values. The header(s) with higher values will be chosen. |

### Examples

#### Example 1

If:

* type1=4, type2=6, type3=2

And the table is:

![table](/files/-MA7-P8iXm1BGmwxD-W0)

**RANK(table)** will return this group:

```
title: 'Title 2'
subtitle: 'Subtitle2'
```

**RANK(table, 2)** will return a list with these two groups:

```
title: 'Title 2'
subtitle: 'Subtitle2'

title: 'Title 1'
subtitle: 'Subtitle1'
```
