Error Failed to evaluate queries and expressions: input data must be a wide series but got type not (input refid)

Trying to alert when I have 80% or higher sites down, but my query that works in a standar panel does not work for alerting.

Use SolarWindsOrion
SELECT
Parent_account_number,
Parent_account_name,
COUNT() AS TotalNodes,
SUM(CASE WHEN Status = 2 THEN 1 ELSE 0 END) AS NodesDown,
(SUM(CASE WHEN Status = 2 THEN 1 ELSE 0 END) * 100.0 / COUNT(
)) AS PercentageNodesDown
FROM
Nodes
WHERE
CustID IS NOT NULL
GROUP BY
Parent_account_number,
Parent_account_name
ORDER BY
PercentageNodesDown DESC,
Parent_account_number;