I have a MySQL table with start and end dates. E.g rows like this:
start | end
2022-03-01 | 2022-04-10
2021-12-01 | 2022-03-11
2022-01-01 | 2022-04-05
...
I want to count how many of the days in those ranges (all rows) were in April 2022 for instance. The first record has 10 days in April, the third record has 5 days in April, so the result should be 15.