Skip to Content
-2
May 09, 2018 at 09:53 PM

Flexible Search

104 Views

Hi Experts , Could you please help me in below query if possible :

No. of users who have not placed an order in 5 days ".

SELECT COUNT(*) FROM {User as u} WHERE {o.modifiedtime} < NOW() - INTERVAL 5 DAY ({{ SELECT {pk} from {Order as o} WHERE {o.user} = {u.pk} }})

Thanks in advance ....