Open this example in the interactive library
Source code
WITH readings(v) AS (VALUES(-1),(3),(5)) SELECT avg(nullif(v,-1)) AS mean FROM readings;
Sample output
[
{
"mean": 4
}
]
Open this example in the interactive library
WITH readings(v) AS (VALUES(-1),(3),(5)) SELECT avg(nullif(v,-1)) AS mean FROM readings;
[
{
"mean": 4
}
]