---
title: yield() function
description: yield() delivers input data as a result of the query.
url: https://docs.influxdata.com/flux/v0/stdlib/universe/yield/
estimated_tokens: 935
product: Flux
version: v0
---

# yield() function

-   Flux 0.7.0+
-   View InfluxDB support

`yield()` delivers input data as a result of the query.

A query may have multiple yields, each identified by unique name specified in the `name` parameter.

**Note:** `yield()` is implicit for queries that output a single stream of tables and is only necessary when yielding multiple results from a query.

##### Function type signature

```js
(<-tables: stream[A], ?name: string) => stream[A] where A: Record
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### name

Unique name for the yielded results. Default is `_results`.

### tables

Input data. Default is piped-forward data (`<-`).

## Examples

### Yield multiple results from a query

```js
import "sampledata"

sampledata.int()
    |> yield(name: "unmodified")
    |> map(fn: (r) => ({r with _value: r._value * r._value}))
    |> yield(name: "squared")
```

#### Related

-   [InfluxQL – SELECT AS](/influxdb/v1/query_language/explore-data/#the-basic-select-statement)

[outputs](/flux/v0/tags/outputs/)
