This example shows the C code for a simple aggregate UDF that calculates the standard deviation, as follows: