Thanks for your replies and sorry for the late response!
Could someone please help me to check why these two queries return different values?
select count(*) FROM WebUsageStatsTb where datediff(day,dateTime, getutcdate()) >30 and website = 'xxx'
select count(*) FROM WebUsageStatsTb where dateTime < dateadd(day, -30, getutcdate()) and website = 'xxx'
Actually I have to retire this query:
DELETE FROM WebUsageStatsTb where datediff(day,dateTime, getutcdate()) >30 and website = 'xxx'
and use a query that contains dateadd() instead of datediff(), in order to have a better performance.
Thank you.
Hugo.