Skip to main content
Skip to main content

boundingRatio

Aggregate function that calculates the slope between the leftmost and rightmost points across a group of values.

Example:

Sample data:

The boundingRatio() function returns the slope of the line between the leftmost and rightmost points, in the above data these points are (0,0) and (9,13.5).

Try ClickHouse Cloud for FREE

Separation of storage and compute, automatic scaling, built-in SQL console, and lots more. $300 in free credits when signing up.

Try it for Free