0

I need a clause in my query to bring back data when an event happened within 45 days of another event. An example:

WHERE D1.Date  Is within 45 days after   D2.date

I am currently using this but I don't think it's getting me what I want:

AND ABS (D1.Date - D2.date) >= 45

EDIT:

Thank you for your answer, I've amended it slightly to my needs:

AND D1.Date BETWEEN D2.date AND d2.date +45

  • 1
    Heya, I removed your "1st post, be nice" and "thanks for your time" salutation. It's appreciated, but respectively we (should) try to be nice to *everyone*, and show "thanks" by upvoting good Q's and A's, and answering others' questions. – Jeroen Feb 07 '14 at 11:17

1 Answers1

1

... WHERE D1.date BETWEEN D2.date AND date_add(D2.date,INTERVAL 45 DAY);