Возможно, это поможет:
declare @A table
( xHours int, xMinutes int, xSeconds int,
yHours int, yMinutes int, ySeconds int )
insert into @A ( xHours, xMinutes, xSeconds, yHours, yMinutes, ySeconds ) values
( 7, 23, 59, 13, 44, 51 ),
( 0, 00, 12, 1, 07, 00 );
with A as ( select *,
3600 * xHours + 60 * xMinutes + xSeconds as xTotal,
3600 * yHours + 60 * yMinutes + ySeconds as yTotal
from @A ),
B as ( select *,
cast ( DATEADD(second,xTotal,'00:00:00') as time(0)) as xTime,
cast ( DATEADD(second,yTotal,'00:00:00') as time(0)) as yTime
from A ),
C as ( select *, 100*CAST(xTotal as float)/CAST(yTotal as float) as Usage from B )
select xTotal, yTotal, xTime, yTime, Usage from C
Результат:
xTotal yTotal xTime yTime Usage
26639 49491 07:23:59 13:44:51 53.8259481521893
12 4020 00:00:12 01:07:00 0.298507462686567