v.25.11New Feature

Introduce midpoint scalar function that calculates average

Introduces midpoint scalar function that calculates average. Resolves #89029. #89679 (simonmichal).
Introduces the midpoint scalar function that calculates the average of two numbers.

Why it matters

The midpoint function provides a straightforward way to compute the average value between two numeric inputs, simplifying calculations that require finding the midpoint. This resolves issue [#89029] by adding a native function to improve query expressiveness and reduce the need for manual calculations.

How to use it

Use the midpoint function in your SQL queries by passing two numeric arguments, for example:

sql<br>SELECT midpoint(10, 20);<br>
This will return the average of the two numbers.