https://torbjornzetterlund.com/mysql-store-procedure-routine-to-break-a-date-range-into-a-record-per-day-for-reporting/