here is my example of SWQL query for fetching syslog message for my switches, my switech name is start with "SW*"
SELECT TOP 25
Level AS [Severity]
,nod.Caption AS [Node]
,nod.DetailsUrl AS [_linkfor_node]
,'/Orion/images/StatusIcons/Small-' + nod.StatusIcon AS[_iconfor_node]
,TOLOCAL(DateTime) AS [Log Time]
,SUBSTRING(Message,1,100) AS Message
,CONCAT('https://solar.ficld.ir','/ui/orionlog/logviewer/now/1hours/',${NodeID},'/syslog') AS _linkfor_Message
FROM Orion.OLM.LogEntry le
JOIN Orion.OLM.LogEntryType let ON le.LogEntryTypeID = let.LogEntryTypeID
JOIN Orion.Nodes nod ON le.NodeID = nod.NodeID
where Node LIKE 'sw%' AND level not LIKE 'Notice' --match to my switch name
ORDER BY DateTime DESC
i will be happy anyone complete this code