SOLVED - Use Last on multiple tags to derive a sum

I have a bunch of power data coming in from sensors on servers and want to query for the last reading from each server that has come in and sum them up to display in a Grafana SingleStat panel. Using something like a Now() - 5m timing type filter runs the risk of missing out on a result per server whereas the LAST() would work great but I can;t seem to figure out how to get it to return the last for each server.

Any ideas?

k.

Nevermind. Sorry, was getting frustrated and posted this Question about two seconds before figuring it out. A typo was holding me up, not the approach.

SELECT SUM(last) FROM (select last(amps) from power_stats_data group by “designation”)

No problem! Glad you got it worked out.