I would like to subtract one value from another value. The schema of the table is as follows:
tag, datetime,value ------------ tag1, 2010-1-1 10:10
select h1.value - h2.value from History h1 inner join History h2 on h1.Datetime = '2010-1-1 10:10' and Datetime ='2010-1-1 10:12'