renier8 Posted May 4, 2022 Share Posted May 4, 2022 Hi. Is there a way that I can isolate and remove all customers that have not purchased in the last three years? Thank you Renier Link to comment Share on other sites More sharing options...
idnovate.com Posted May 4, 2022 Share Posted May 4, 2022 With this query you can select the customers that have never placed any order: SELECT * FROM ps_customer c WHERE id_customer NOT IN (SELECT id_customer FROM ps_orders) Then you can filter by date if needed. 1 Link to comment Share on other sites More sharing options...
renier8 Posted May 4, 2022 Author Share Posted May 4, 2022 Thank you very much😎 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now