I’m trying to get event count from the MSSQL database grouped by months but with a few conditions. Cant build query that makes the result I’m hoping to get.
I want to get current year’s events where startTime is less than or equal to end of the current month and endTime is greater than or equal to start of the current month.
Example:
Events in January: startTime <= 01.31.2024 23:59 AND endTime >= 01.01.2024 00.00
So if the event is long, it could be counted over several months.