• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 88
  • Last Modified:

Help with SQL code to Identify Customers Who Made recent purchase

I have a large table with customer id, product id, product ordered, product ordered date.  I want to identify customers who have placed orders in the last 60 day or 2 months. The data is in a oracle database.

Please help with a SQL like code.

1 Solution
Naitik GamitSoftware DeveloperCommented:
You can write query in SQL as:

SELECT customer_id, product_id, product_ordered, product_ordered_date FROM customer_data
WHERE product_ordered_date >= DATEADD(d,-60,product_ordered_date );  //in last 60 days.
fb1990Author Commented:
Thanks for the help!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now