Example 4: querying the history table with the wwvalueselector parameter
- Last UpdatedMar 19, 2025
- 1 minute read
You can query the History table with the wwValueSelector parameter.
SELECT DateTime, TagName, Value, wwResolution
FROM History
WHERE Tagname like 'MyTag'
AND DateTime >= '2012-01-19 10:00:00'
AND DateTime <= '2012-01-19 11:00:00'
AND wwValueSelector = 'STDDEV'
The results are:
|
DateTime |
TagName |
Value |
wwResolution |
|---|---|---|---|
|
2012-01-19 10:00:00.0000000 |
MyTag |
977.157928752564 |
60000 |
|
2012-01-19 10:01:00.0000000 |
MyTag |
16.5619987924163 |
60000 |
|
2012-01-19 10:02:00.0000000 |
MyTag |
16.5619987924163 |
60000 |
|
2012-01-19 10:03:00.0000000 |
MyTag |
16.5619987924165 |
60000 |
|
2012-01-19 10:04:00.0000000 |
MyTag |
16.5619987924163 |
180000 |
|
2012-01-19 10:07:00.0000000 |
MyTag |
16.5619987924171 |
60000 |
|
2012-01-19 10:08:00.0000000 |
MyTag |
16.5619987924163 |
60000 |
|
2012-01-19 10:09:00.0000000 |
MyTag |
16.5619987924179 |
60000 |
|
2012-01-19 10:10:00.0000000 |
MyTag |
16.5619987924163 |
180000 |
|
2012-01-19 10:13:00.0000000 |
MyTag |
16.5619987924195 |
60000 |
|
2012-01-19 10:14:00.0000000 |
MyTag |
16.5619987924163 |
240000 |
|
2012-01-19 10:18:00.0000000 |
MyTag |
16.5619987924226 |
180000 |
|
2012-01-19 10:21:00.0000000 |
MyTag |
16.5619987924163 |
60000 |
|
2012-01-19 10:22:00.0000000 |
MyTag |
16.5619987924226 |
60000 |
|
2012-01-19 10:23:00.0000000 |
MyTag |
16.5619987924038 |
60000 |
|
... |