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

> 値のグループ内で、最も左の点と最も右の点の間の傾きを計算する aggregate function。

# boundingRatio

<div id="boundingRatio">
  ## boundingRatio
</div>

導入バージョン: v20.1.0

値の集合における、最も左の点と最も右の点の間の傾きを計算します。

**構文**

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

**引数**

* `x` — X 座標の値。 [`(U)Int*`](/ja/reference/data-types/int-uint) または [`Float*`](/ja/reference/data-types/float) または [`Decimal`](/ja/reference/data-types/decimal)
* `y` — Y 座標の値。 [`(U)Int*`](/ja/reference/data-types/int-uint) または [`Float*`](/ja/reference/data-types/float) または [`Decimal`](/ja/reference/data-types/decimal)

**戻り値**

最も左の点と最も右の点を結ぶ直線の傾きを返します。データが空の場合は `NaN` を返します。 [`Float64`](/ja/reference/data-types/float)

**例**

**サンプルデータ**

```sql title=Query theme={null}
SELECT
    number,
    number * 1.5
FROM numbers(10)
```

```response title=Response theme={null}
┌─number─┬─multiply(number, 1.5)─┐
│      0 │                     0 │
│      1 │                   1.5 │
│      2 │                     3 │
│      3 │                   4.5 │
│      4 │                     6 │
│      5 │                   7.5 │
│      6 │                     9 │
│      7 │                  10.5 │
│      8 │                    12 │
│      9 │                  13.5 │
└────────┴───────────────────────┘
```

**使用例**

```sql title=Query theme={null}
SELECT boundingRatio(number, number * 1.5)
FROM numbers(10)
```

```response title=Response theme={null}
┌─boundingRatio(number, multiply(number, 1.5))─┐
│                                          1.5 │
└──────────────────────────────────────────────┘
```
