select v1.Value1 - v2.Value2 from
(Select Max(Value) as [Value1] from History WHERE Datetime ='2010-1-1 10:10' and tagname ='tag1') as v1
CROSS JOIN
( (Select Max(Value) as [Value2] from History WHERE Datetime ='2010-1-1 10:12' and Tagname ='tag2') as v2)