我搜索了一些方法,包括DATEADD函数,但这似乎并不优雅.
select Max(ISNULL(MyDateCol,cast(0 as datetime))) from soMetable group by SomeCol