I'm fairly new to SWQL and SQL but was able to build this query in SWQL Studio in preparation to moving it over to the web report builder but when I copied it over into the web report builder I get an error stating that it is an invalid query.
Following is the query:
select n.dns,
(select count(p.Speed) as sp1
from orion.udt.port p
where p.nodeid=n.nodeid
and p.speed = 10000000000) as Port_Total,
(select count(p.Speed) as sp2
from orion.udt.port p
where p.nodeid=n.nodeid
and p.speed = 10000000000
and p.operationalstatus=1) as Port_Active
from orion.nodes n
where n.dns like 'r1-%'
or n.dns like 'r2-%'
or n.dns like 'wr-%'
or n.dns like 'cr-%'
order by n.dns
Any help on this would be much appreciated.