可能是SQL Server中最简单的方法cross apply:
cross apply
select d.*, m.maxdate from #dates d cross apply (select max(dte) as maxdate from (values (date1), (date2), (date3)) as v(dte) ) m;