Hello
I’m trying to run a report how shown the visits during the last 30 days, so I used this query but apparently, it’s wrong :
select distinct user_id, max(visited_at) as visited_at from user_visits
WHERE CAST(visited_at AS DATE) >= GETDATE() -30
group by user_id
I tested also this condition
WHERE CAST(visite d_at AS DATE) >= CAST(GETDATE() -30 AS DATE)
is it possible to have this kind of conditions ?
Thank you