---
title: "Operators in Strata | Oplema"
description: "Calculate values and combine comparisons with arithmetic, comparison and logical operators, such as price * qty. Use them in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/operators"
updated: "2026-11-04"
---

# Operators

Calculate values and combine comparisons in expressions.

## Try an expression

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

Example input

1. Row 1 `price = 5, qty = 2`
2. Row 2 `price = 10, qty = 3`
3. Row 3 `price = NULL, qty = 2`

### Expression

```
price * qty
```

### Result

```
Row 1: 10
Row 2: 30
Row 3: NULL
```

NULL means the value is missing.

Try it live in Formula

Result
| id | price | qty | result |
| --- | --- | --- | --- |
| 1 | 5 | 2 | 10 |
| 2 | 10 | 3 | 30 |
| 3 |  | 2 |  |

## Arguments and types

```
a + b, a % b, a = b, a AND b, a || b, a IN (...)
```

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

## Things to know

Use a % b or mod(a, b) to get the remainder after division. For example, 7 % 3 returns 1.

### Combine comparisons

For this example, set Output type to **BOOLEAN**.

```
price > 5 AND qty >= 2
```

Row 1: false Row 2: true Row 3: NULL

### Match one of several values

For this example, set Output type to **BOOLEAN**.

```
price IN (5, 10)
```

Row 1: true Row 2: true Row 3: NULL

### Join text

For this example, set Output type to **VARCHAR**.

```
CAST(price AS VARCHAR) || ' units'
```

Row 1: '5 units' Row 2: '10 units' Row 3: NULL

## Related functions

[coalesce

Replace missing values with the first available alternative.

](https://oplema.com/docs/strata/functions/coalesce)[if

Choose between two values using a condition.

](https://oplema.com/docs/strata/functions/if)[IS NULL

Find missing values without confusing them with empty text.

](https://oplema.com/docs/strata/functions/is-null)[BETWEEN

Check whether a value falls within an inclusive range.

](https://oplema.com/docs/strata/functions/between)

[Browse conditions & missing values](https://oplema.com/docs/strata/functions#conditions-&-missing-values) [DuckDB documentation](https://duckdb.org/docs/current/sql/expressions/overview.html)

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