Sub queries are not working

Hi Team,

Good day!!
-Unable to fetch Top transactions list from all the ADE servers(which are in sub query). Tried to modify the query but none of the below worked out.
-These queries are giving only one value but not TOP N values as expected.
-We are using Grafana v6.2.5

SELECT top(LTR, 5),Transactions FROM (SELECT mean(Transactions) as LTR FROM “SQLServerTransactions” WHERE (“Product” = ‘ade’ AND “JustService” = ‘db-mssql’) AND timeFilter GROUP BY time(__interval), “host”,Transactions, fill(previous))

SELECT top(“Transactions”, 10) FROM (SELECT max(“Transactions”) FROM “SQLServerTransactions” WHERE (“Product” != ‘ade’ AND “JustService” = ‘db-mssql’) AND timeFilter GROUP BY time(__interval), “host”, “instance” fill(previous)) WHERE $timeFilter

SELECT TOP(Transactions,5) FROM (SELECT max(“Transactions”) as Transactions FROM “SQLServerTransactions” WHERE (“JustService” = ‘db-mssql’ AND “Product” =‘ade’ ) AND time > now() - 30m GROUP BY time(__interval), "host" fill(previous)) WHERE time > now() - 5m GROUP BY time(__interval), “host”

It would be really great if anyone can give any suggestions on this.

Thanks & Regards.