> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RS_SummaryStatsAll

Returns summary stats struct consisting of count, sum, mean, stddev, min, max for a given band in raster. If band is not specified then it defaults to `1`.

<Note>
  If excludeNoDataValue is set `true` then it will only count pixels with value not equal to the nodata value of the raster.
  Set excludeNoDataValue to `false` to get count of all pixels in raster.
</Note>

<Note>
  If the mentioned band index doesn't exist, this will throw an `IllegalArgumentException`.
</Note>

## Signatures

```sql theme={"system"}
RS_SummaryStatsAll(raster: Raster, band: Integer = 1, excludeNoDataValue: Boolean = true)
```

```sql theme={"system"}
RS_SummaryStatsAll(raster: Raster, band: Integer = 1)
```

```sql theme={"system"}
RS_SummaryStatsAll(raster: Raster)
```

## Parameters

<ParamField body="raster" type="Raster" required>
  The input raster.
</ParamField>

<ParamField body="band" type="Integer" default="1">
  The band index.
</ParamField>

<ParamField body="excludeNoDataValue" type="Boolean" default="true">
  Whether to exclude NoData pixels from the calculation.
</ParamField>

## Return type

<ResponseField type="Struct<count: Long, sum: Double, mean: Double, stddev: Double, min: Double, max: Double>">
  A struct containing the result fields.
</ResponseField>

## Examples

```sql theme={"system"}
SELECT RS_SummaryStatsAll(RS_MakeEmptyRaster(2, 5, 5, 0, 0, 1, -1, 0, 0, 0), 1, false)
```

```
{25.0, 204.0, 8.16, 9.4678403028357, 0.0, 25.0}
```

```sql theme={"system"}
SELECT RS_SummaryStatsAll(RS_MakeEmptyRaster(2, 5, 5, 0, 0, 1, -1, 0, 0, 0), 1)
```

```
{14.0, 204.0, 14.571428571428571, 11.509091348732502, 1.0, 25.0}
```
