3 hours ago, EvaF said:the sql query can look like:
select count(id_order) as cntorders, max(o.date_add) as latest, c.id_customer, lastname, firstname from ps_customer c join ps_orders o on o.id_customer = c.id_customer group by o.id_customer having count(o.id_order)>1 order by 1 desc
Thank you very much! It works, however it is still counting orders that have been cancelled/refunded.
How could I make this query only count the orders which are marked as "Shipped"? Is this possible?
Thank you.