---
title: "list_grade_up function in Strata | Oplema"
description: "Sort a list and return the original positions of its items instead of their values. For example, list_grade_up([3, 6, 1, 2]) returns [3, 4, 1, 2]."
url: "https://oplema.com/docs/strata/functions/list-grade-up"
updated: "2026-11-04"
---

# list\_grade\_up

Sort a list and return the original positions of its items instead of their values. It accepts the same options as list\_sort.

Also available as array\_grade\_up, grade\_up.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
list_grade_up([3, 6, 1, 2])
```

### Result

```
'[3, 4, 1, 2]'
```

The expression returns `BIGINT[]`. Formula stores it as `VARCHAR` in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | \[3, 4, 1, 2\] |

## Arguments and types

```
list_grade_up(list[, order[, null_order]])
```

**list**

List

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[list\_distinct

Remove duplicates and missing values from a list. The original order isn't kept.

](https://oplema.com/docs/strata/functions/list-distinct)[array\_to\_string

Join the values in a list into one string using a separator.

](https://oplema.com/docs/strata/functions/array-to-string)[array\_to\_string\_comma\_default

Join the values in a list into comma-separated text.

](https://oplema.com/docs/strata/functions/array-to-string-comma-default)[list\_approx\_count\_distinct

Calculate an approximate count of distinct values from the values in a list.

](https://oplema.com/docs/strata/functions/list-approx-count-distinct)

[Browse lists & arrays](https://oplema.com/docs/strata/functions#lists-&-arrays) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/list.html#list_grade_uplist-col1-col2)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
