I was building a query that ranked users by the number of votes they cast per day, and it dawned on my that doing the following has a serious flaw (which may well be my fault?):
/* with added line break to avoid horizontal scroll */ ROUND(CAST((U.UpVotes + U.DownVotes) AS FLOAT) / DateDiff(day,CreationDate,getdate()),3) AS VotePerDay
DateDiff is counting the days from the users creation to the date of the query, but the vote counts are from the users creation to whenever the data explorer was last updated.
So, is there are way to get the date/time of the last data update with a query?
Preferably this done in a manner that can just be dropped in to replace
And I do not wish to get the user to enter a parameter value.