Total the two electric legs, Watts1 and Watts 2 to show total Watts

I have been enjoyed one of the best program so far and playing with it since I was able to connect to MySQL. How do I graph the total Watts from Watts1 and Watts 2. This is my query that I have so far.

SELECT
UNIX_TIMESTAMP(datecreated) as time_sec,
devicevalue as value,
devicename as metric
FROM history
WHERE $__timeFilter(datecreated) and deviceroom = ‘Energy Monitor’ and devicename in (‘Watts 1’, ‘Watts 2’)
ORDER BY datecreated ASC

Thanks,
Aldo

Not a SQL query expert sadly, might be better asking this question on stackoverflow and label it MySQL.

You need to have in your query (watt1.devicevalue + watt2.devicevalue) as value, so you probably need to join the table with itself. But maybe there is another way, but this is not a really a Grafana question but just a SQL query question.

thank you very much, you have guided to perhaps a solution.