What's the difference between these two qualifiers:
datediff(d, max(t.created), getDate()) <= 45
max(txn.created) > DATEADD(DAY, -45, GETDATE())
I'm thinking with the first one you have all of the rows where the t.created value falls within a range defined by the difference of today's date and whatever t.created values equals to 45 days or less.
The second clause is all of the rows that have a date that's greater than today's date minus 45 days.
Even when I attempt to explain that, I'm thinking they are fundamentally the same, but am I missing something?