Это должно привести вас туда
declare @t table (Name varchar(20), tm datetime2, Type varchar(20));
insert into @t values
('CL1', '2018-05-22 10:50:00 -04:00', 'SampleAndTrade'),
('CL1', '2018-05-22 11:00:00 -04:00', 'TradeOnly'),
('CL1', '2018-05-22 11:10:00 -04:00', 'TradeOnly'),
('CL1', '2018-05-22 11:20:00 -04:00', 'TradeOnly'),
('CL1', '2018-05-22 14:10:00 -04:00', 'SampleAndTrade'),
('CL1', '2018-05-22 14:20:00 -04:00', 'TradeOnly'),
('CL1', '2018-05-22 14:30:00 -04:00', 'TradeOnly'),
('CL1', '2018-05-22 14:40:00 -04:00', 'TradeOnly'),
('CL1', '2018-05-22 14:50:00 -04:00', 'TradeOnly'),
('HO1', '2018-05-22 10:50:00 -04:00', 'SampleAndTrade'),
('HO1', '2018-05-22 11:00:00 -04:00', 'TradeOnly'),
('HO1', '2018-05-22 11:10:00 -04:00', 'TradeOnly'),
('HO1', '2018-05-22 11:20:00 -04:00', 'TradeOnly'),
('HO1', '2018-05-22 14:10:00 -04:00', 'SampleAndTrade'),
('HO1', '2018-05-22 14:20:00 -04:00', 'TradeOnly'),
('HO1', '2018-05-22 14:30:00 -04:00', 'TradeOnly'),
('HO1', '2018-05-22 14:40:00 -04:00', 'TradeOnly'),
('HO1', '2018-05-22 14:50:00 -04:00', 'TradeOnly');
with cte as
( select t1.*
, lead(type) over (partition by name order by tm) as nextType
from @t t1
)
select t1.Name, t1.tm, min(t2.tm)
--, t1.Type, t2.tm, t2.nextType
from cte t1
join cte t2
on t1.Name = t2.Name
and t1.Type = 'SampleAndTrade'
and (t2.nextType = 'SampleAndTrade' or t2.nextType is null)
and t2.tm > t1.tm
group by t1.Name, t1.tm
order by t1.name, t1.tm