Looking at the first script, seems like all you have to do is change the two lines of code where the date calculation and grouping from monthly basis to daily basis:....DATEDIFF(dd, @startDate, BS.backup_start_date) AS DaysAgo ....GROUP BY BS.database_name ,DATEDIFF(dd, @startDate, BS.backup_start_date)...
However, two things:a) I have not tested the code, nor have I run it. What I said is based on just looking at it.b) He is doing static pivoting in the outer query limited to 12 columns. So you will get data only for 12 days if you keep it exactly like that. You may want to avoid the pivoting altogether, or expand it if you need more days.