4

I want to get customers list that didn't bought in last X months in magento 1 or 2?

Like:

Last 12 months

Last 9 months

Last 20 months

Last 36 months

3
  • 1
    Filter the sales/order collection with the date range and get all the unique customer_ids. And then filter the customer collection with condition not in customer_ids. – Athul Vijayan Jun 22 '18 at 4:50
  • Do you need SQL query for that? – Nikunj Vadariya Jun 22 '18 at 5:02
  • I need collections of customers. – Chandra Kumar Jun 22 '18 at 5:08
0

in database of magento 2 there is a table ## sales_order ## from there you take the customer details.

2
  • That is not a good idea. The customer can visit the site without placing order. – Athul Vijayan Jun 22 '18 at 4:29
  • @AthulVijayan sorry its my mistake . you can actually take details from sales_order table – hetesh mohan Jun 22 '18 at 4:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.