I have a booking database with various dates for each booking. I want to get a count of all bookings in each month e.g.
JAN | 12 FEB | 15 MAR | 53 APR | 25
The easy way is using a months table because you can have empty months.
create table months ( month_id integer, date_ini datetime, date_end datetime )
And this are some examples of how create that table automatic
Using select Generate days from date range
This use store procedure in MSQL