SWQL query for nodes down for "x" days (Zombie Nodes)

Hello. I'm looking to get a report that shows nodes that have been down for a certain number of days, and have not been up during that time. I want it to also display a custom value as well. I think however my SQWL query just checks if the node is currently down, and that it's been down at some time over 30 days ago. If someone could double-check my work it would be appreciated! This is what I have:

SELECT n.NodeID, n.Caption, n.IPAddress, n.CustomProperties.Tier, p.LastPollDateTime, n.PolledStatus, n.LastSystemUpTimePollUTC 

FROM Orion.AssetInventory.Polling AS P

INNER JOIN Orion.Nodes AS N ON P.NodeID = N.NodeID

WHERE n.PolledStatus = 2

AND p.LastPollDateTime <= AddDay(-30, GETDATE())
AND (n.LastSystemUpTimePollUTC  <= AddDay(-30, GETDATE()) OR n.LastSystemUpTimePollUTC IS NULL)

ORDER BY p.LastPollDateTime DESC

Thanks for looking it over in advance!