Когато започне разговор, броят на разговорите се увеличава. Когато разговорът приключи, броят на разговорите намалява. И така...
;with cte as
(
select SessionStartTime as changetime,1 as CC from yourtable
union all
select SessionCloseTime,-1 from yourtable
)
select top 1 changetime,rt from
(
select * from cte
cross apply
(select SUM(cc) as rt from cte c where c.changetime<=cte.changetime) rt
) v
order by rt desc