Display total energy for all devices

Right now I have espurna pushing data into influxDB about power usage and can visualise this on a per device level like such.

SELECT top("value", 10)  / 3600000 FROM "J" GROUP BY time($__interval), "entity_id" fill(null)

Which in Grafana looks like:

How can I display this as a total? meaning how can I show the total energy consumption for all devices on a single line? I was trying something like a sub query for this and then using sum but I this doesn’t look correct.

Any pointers will be great.