How to get all customers who have never bought anything in PrestaShop

The following MySql query will get all registered customers who have never bought anything

SELECT  firstname, lastname, email,  date_add, active
FROM   ps_customer
WHERE  NOT EXISTS
(SELECT ps_orders.id_customer
FROM   ps_orders
WHERE  ps_orders.id_customer = ps_customer.id_customer)

Was this article helpful?

Related Articles