> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-vortex-format.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 统计 `y` 和 `x` 均不为 `NULL` 的行数。

# regr_count

<h2 id="regr_count">
  regr\_count
</h2>

引入版本：v26.9.0

统计 `y` 和 `x` 均不为 `NULL` 的行数。

**语法**

```sql theme={null}
regr_count(y, x)
```

**别名**：`regrCount`

**参数**

* `y` — 因变量。[`(U)Int*`](/zh/reference/data-types/int-uint) 或 [`Float*`](/zh/reference/data-types/float)
* `x` — 自变量。[`(U)Int*`](/zh/reference/data-types/int-uint) 或 [`Float*`](/zh/reference/data-types/float)

**返回值**

返回非 NULL 值对的数量。[`UInt64`](/zh/reference/data-types/int-uint)

**示例**

**基本用法**

```sql title=Query theme={null}
SELECT regr_count(y, x)
FROM VALUES('x Float64, y Float64', (1, 2), (2, 4), (3, 6), (4, 8))
```

```response title=Response theme={null}
┌─regr_count(y, x)─┐
│                4 │
└──────────────────┘
```
