# SPLIT

### Syntax

**SPLIT(items, table)**

| Argument name                                | Description                                    |
| -------------------------------------------- | ---------------------------------------------- |
| <p><strong>items</strong></p><p>Required</p> | List of items.                                 |
| <p><strong>table</strong></p><p>Required</p> | Table with a direct association between items. |

**Table syntax**

| Column name                                  | Description                      |
| -------------------------------------------- | -------------------------------- |
| <p><strong>item</strong></p><p>Required</p>  | Item identifier.                 |
| <p><strong>group</strong></p><p>Required</p> | Group where the item belongs to. |

### Examples

If:

* *items* = \[*id1*, *id2*, *id3*, *id4*, *id5*]

And the table is:

![table](https://1947171238-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LrTaL6FQB3RzlkCwQfN%2F-MA6O8EZvKGaUC5r4p7f%2F-MA6a-Y1QeEiYhpf7BNB%2Fimage.png?alt=media\&token=549b7379-339c-49ec-980c-37ce274a2353)

**SPLIT(items, table)** returns:

```
group1: [id1, id3]
group2: [id4, id5]
group3: [id2]
```
