I am trying to get records which any of starts_at column anniversaries matches with a range period, but not with ends_at one.
For instance, we have this subscriptions table:
| id | starts_at | ends_at |
|---|---|---|
| 1 | 2015-01-01 | 2016-01-01 |
| 2 | 2014-01-01 | 2017-01-01 |
And for range 2015-12-01 to 2016-02-01.
I will need the one with ID: 2 because one of its anniversaries (2016-01-01) is in range but ends_at is not.