Help writing continuous query subtracting two series

Well that all makes sense. Some background for you. I have a power monitoring device called Greeneye monitor that monitors the power of every circuit in my house. I then use a python script called btmon.py that was written to upload data to various online services. One of the services it provides is to publish to a MQTT server. It could probably be modified to have the better format you state above, but I am not a programmer so I will have to see if the original developer could make those changes.

The python script does have the ability to input data directly to influxdb in the format you mention, but I wanted to use MQTT for some other reasons.