In the above output the solution fetches last year's records.but I want to fetch last 12 months irrespective of year
Eg., if the data is till july 2021..last 12 months would be july 2020 to july 2021..
if the data is till feb 2020..last 12 months would be july 2019 to july feb 2020..
and also I should be able to change number of months I fetch...
sometimes I might want to fetch last 4 months also