The following query will work provided you have the input params starttime and endtime which determine total utilization per day.declare @starttime datetime, @endtime datetimeset @starttime = '1/1/2003 08:00:00'set @endtime = '1/1/2003 17:00:00'select startdate,enddate,((convert(decimal,datediff(ss,startdate,enddate))) / datediff(ss,@starttime,@endtime) ) * 100 as percent_usedfrom dates
But what is going on with the 3 line of data?If this will be stored as such you will need to add a parameter indicating how many days/week a person can be utilized and the query will need to be modified to determine ttl utlilization for the day-spanning duration.