We have table structure and data like
Id | startdate | enddate | price
1. | 1 jan | 30 Jan | 100
2 | 1 Feb | 28 Feb | 200
3. | 1 March | 31 March | 300
Now I want to calculate total price between the date range. Like from 1 Jan to 28 Feb total count will be 300, from 1 Feb to 31 March total count will.be 500, how to write query for this