Я написал какую-то чушь выше, а удалить или поправить нельзя (( не бейте больно...
вот вариант:
select xInstrument, AVG(xAvgLatency_star), SUM(xCount) from (
select
*,
(test.xAvgLatency - (
select top 1 t1.xAvgLatency from test t1
where t1.xInstrument = test.xInstrument and t1.xTime = (
select MIN(t2.xTime) from test t2
where t2.xInstrument = test.xInstrument and t2.xTime > 0))
) xAvgLatency_star
from test ) t
group by t.xInstrument
И еще можно оптимизировать, вычисляя "*" не для каждой записи. а для каждого инструмента.