Search Event Frames by element attribute
- Last UpdatedSep 29, 2022
- 1 minute read
- PI System
- PI OLEDB Enterprise 2019
- Developer
SELECT ef.Name, ef.StartTime, ef.EndTime
FROM EventFrame.EventFrame ef
INNER JOIN Asset.ElementAttribute ea
ON ea.ElementID = ef.PrimaryReferencedElementID
WHERE ef.PrimaryReferencedElementID IS NOT NULL
AND ea.Name = 'Productivity'
AND ef.starttime BETWEEN '03-jun-2012' AND '06-jun-2012'
ORDER BY 1;
Find all event frames referencing any elements with a specific attribute and starting in a certain time range.