Error using INNER JOIN for a Modern Dashboard table

I am working on a Modern Dashboard table that will pull statistic data from the APM table and match the NodeID from the Nodes table. I am getting the error message "Provided SWQL query is not valid. Details: RunQuery failed, check fault information. mismatched input 'INNER' expecting 'EOF'".

Here is the query I am trying:

SELECT Nodes.Caption, APM.NodeID, APM.ComponentName, APM.ComponentStatisticData, APM.ErrorMessage
FROM Orion.APM.CurrentStatistics AS APM
WHERE APM.ComponentName = 'SSL Certificate Expiration Date Monitor'
INNER JOIN Orion.Nodes AS Nodes
ON Nodes.NodeID = APM.NodeID

If I separate the query into two, they individually work; the issue is something on the INNER JOIN that I can't find out.

  • I figured it out, I had to move the WHERE condition after the JOIN. The query now looks like this:

    SELECT Nodes.Caption, APM.ComponentName, APM.ComponentStatisticData, APM.ErrorMessage
    FROM Orion.APM.CurrentStatistics AS APM
    INNER JOIN Orion.Nodes AS Nodes
    ON Nodes.NodeID = APM.NodeID
    WHERE APM.ComponentName = 'SSL Certificate Expiration Date Monitor'