COUNT
- Last UpdatedMar 03, 2025
- 1 minute read
The COUNT() function returns a count of the delta points for a stream.
Note that if the quality detail of a point differs from the previous point, this counts as a delta point, even if the value doesn't change.
See also COUNTALL.
Syntax
|
Format |
Stream = COUNT(Stream) |
|
Arguments |
Stream - A time-ordered vector of values |
|
Description |
Returns a count of delta points during the query period. |
|
Format |
Stream = COUNT(Stream, TimeInterval) |
|
Arguments |
Stream - A time-ordered vector of values TimeInterval - The time interval over which the delta points are counted |
|
Description |
Returns a count of delta points over the specified time interval during the query period. The query period is based on local time. The returned start time is rounded down to the time interval's unit. For example, if the interval is hourly, the time stamps of all values end with "00:00.000". |
Example 1
The following expression returns the number of times a temperature exceeded a threshold each hour.
COUNT( R21.Temp > 140.0, 1 hour )
Example 2
The following expression returns the total number of recipe steps processed.
COUNT( R22.Step )
Example 3
The following expression returns the number of times a pump is started each day.
COUNT( Pump13.Status = 1, 1 day )