select count(Id) as 'Logins for Past 7 Days' from dbo.Users where LastLoggedIn between dateadd(day, -7, convert(date, getdate())) and dateadd(day, -0, convert(date, getdate()))