Use a CTE that returns the row ID and the result of the DateDiff, then join that to your existing result set? It may or may not be faster, so as always, test it to see.
SQL Server 2016 and Azure SQL Database both give you tables that automatically keep track of changes to your data. Here's how to both create those tables and alter existing tables so they track the ...
当前正在显示可能无法访问的结果。
隐藏无法访问的结果