I would like to know how much time in seconds/percents the tag has "ON" value every hour.
Please write down the query in the format of linked server in SQL (like Select * from OPENQUERY(PI,.....))
Following syntax returns time. Of cause you need to change expr part correctly. I have not checked that it works with OPENQUERY though.
SELECT value*86400 seconds, time
WHERE expr = '''ba:active.1''="Active"'
AND time BETWEEN '*-1h' AND '*'
AND timestep ='00:10:00'
I think you need you put tag name within [ ] to escape '/'.
It worked like this for me:
Retrieving data ...