How Are Historian Calculation Modes and SQL Aggregate Functions Different?
You can extract calculated data from Historian by setting the SamplingMode
column to Calculated
and the CalculationMode
column to the desired calculation mode type. You can use SQL aggregate functions to perform a calculation on a set of values, possibly calculated data, for the same tag or different tags and return a single value.
For instance, when comparing multiple tags you could retrieve the minimum (MIN
) value of each tag. By setting calculation modes, the Historian Administrator only calculates the minimum for each tag over a given time period. By using aggregate functions, the Historian OLE DB Provider calculates the minimum value across all tags (all rows in a table), in other words, the minimum of all minimum tag values.
For more information on SQL aggregate functions, refer to SQL Aggregate Functions.