Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Count rows based on Two dates

Hi Team,

 

I have a data of Start date and End date and product id. I want to calcuate count of product Id based condition on start date and end date.

 

Example- I want to calcuated count

select count (*) from tabel

where startdate >= '1-8-2019' and end date <= '31-8-2019'

 So want to calculate count for every month Jan to Dec based on Start date and end date.

Could you please give some idea about this.

 

Thanks

3 Replies