# 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'
```


---

# 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://help.pickzen.com/guides/nocode/functions/rank.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.
