Jump to content

query to select all customers who never bought anything?


Recommended Posts

hi

 

I am stuck trying to find the right query to select all registered customers who never placed an order...

 

I use this query

 

select c.id_customer, c.firstname, c.lastname, count(o.id_order) as ordercnt
from ps_customer c
left join ps_orders o on c.id_customer = o.id_customer
group by o.id_customer

 

 

but it doesn't return what i want

 

Any help?

 

Thanks

 

Pat

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...