Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

MIN/MAX examples

  • Last UpdatedFeb 07, 2025
  • 1 minute read

Example 1

The following expressions return the minimum (or maximum) flow rate of a pump.

MIN(Pump101.Flow)

MAX(Pump101.Flow)

Represented as a query:

SELECT DateTime, Value, OPCQuality

FROM History

WHERE wwExpression = 'MIN(Pump101.Flow)'

AND DateTime > '2022-03-30 00:00:00'

AND DateTime < '2022-03-31 00:00:00'

Result:

DateTime

Value

OPCQuality

2022-03-30 23:43:53.2590000

590.4365234375

192

Example 2

The following expressions return the minimum (or maximum) flow rate of a pump over 30 minute time intervals.

MIN(Pump101.Flow, 30 minute)

MAX(Pump101.Flow, 30 minute)

Represented as a query:

SELECT DateTime, Value, OPCQuality

FROM History

WHERE wwExpression = 'MIN(Pump101.Flow, 30 minute)'

AND DateTime > '2022-03-30 00:00:00'

AND DateTime < '2022-03-31 00:00:00'

Results:

DateTime

Value

OPCQuality

2022-03-30 00:13:45.2590000

592.065856933594

192

2022-03-30 00:43:07.2590000

592.34765625

192

2022-03-30 01:01:07.2590000

593.351257324219

192

...

...

...

2022-03-30 23:43:53.2590000

590.4365234375

192

Example 3

The following expression returns the minimum flow rate of all streams measured in the volumetric flow dimension over 30 minute time intervals.

MIN(SELECT("Dimension","Volumetric Flow"), 30 Minute)

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in