Subtract two queries

I am pretty sure this has been asked before, but none of the responses I found helped me.

I basically have two measures for each day (“sleep_start” and “sleep_stop”), each containing a Unix timestamp. I would like to plot the difference for each pair, which will be in minutes. The data comes from an activity tracker, and each timestamp is the moment I went to sleep and the moment I woke up, respectively.


Grafana reads the two measurements from an influxdb database.