I come to you because I have searched and I have not found anything that can help me with the problem I have. I must show in a query in SQL Server how many days of each month there are between two dates but grouped by months (I have an Initial date and a Final date), I explain with an example:
Start Date = 2017-08-17
Final Date = 2017-10-20
should show something like
August - > 15
September - > 30
October - > 20
I appreciate any help.