Skip to Content
-1
May 09, 2018 at 08:37 PM

Flexible search query

154 Views

Hi Experts , Could you please help me on below query as i didn't get result as expected .

Query :
No. of users with who have never placed an order

SELECT COUNT(*) FROM ({{ SELECT DISTINCT({u.pk}) FROM {User as u JOIN Order as o ON {u.pk} = {o.user} } WHERE {Order} is null }}) as x

Really appreciated for reply