SyntaxFix
Write A Post
Hire A Developer
Questions
You can subtract 7 from the current date with this:
WHERE datex BETWEEN DATEADD(day, -7, GETDATE()) AND GETDATE()