I need a WHERE condition in SQL Server where I can return the past 7 days of activity from a given date.
Pretend I have 2 columns of dates [dateA] and [dateB]
I am looking for something like
SELECT *
FROM TABLE
WHERE [dateB] >= ([dateA] - 7 days)
WHERE dateB >= DATEADD(DAY, -7, dateA)