---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/function-ref/UNNEST
  - ru/function-ref/UNNEST
  - href: en/function-ref/UNNEST.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/function-ref/UNNEST.html
editable: false
vcsPath: en/function-ref/UNNEST.md
---

# UNNEST



#### Syntax {#syntax}


```
UNNEST( array )
```

#### Description {#description}
Expands the `array` array expression to a set of rows.

**Argument types:**
- `array` — `Array of fractional numbers | Array of integers | Array of strings`


**Return type**: Depends on argument types

{% note info %}

`PostgreSQL` doesn't allow filtering fields containing the UNNEST function. If the data source is `PostgreSQL`, do not use such fields in selectors.

{% endnote %}


#### Example {#examples}




Source data

| **City**   | **Category**                       |
|:-----------|:-----------------------------------|
| `'Moscow'` | `['Office Supplies', 'Furniture']` |
| `'London'` | `['Office Supplies']`              |

Result

| **[City]**   | **UNNEST([Category])**   |
|:-------------|:-------------------------|
| `'Moscow'`   | `'Office Supplies'`      |
| `'Moscow'`   | `'Furniture'`            |
| `'London'`   | `'Office Supplies'`      |




#### Data source support {#data-source-support}

`ClickHouse 21.8`, `Files`, `Google Sheets`, `PostgreSQL 9.3`, `Yandex Documents`.
