Select statement for selecting every week's log record
It is possible do this in SQL.  There are really 2 problems here:


Find 1 record per week for each database
Calculate the average rate of consumption




For the first problem, you have a couple of ways to do this:

select databasename, logrecordnumber, logtimestamp
  from MyTable
 where logtimestamp &gt; current timestamp - 42 days
   and dayofweek(logtimestamp) = 0
   and time(logtimestamp) between '11:59:30' and '12:00:30'


This looks at only records in the last 6 weeks, and then finds records that occurred on Sunday (dayofweek() = 0) at 12:00.  (Using the between predicate should handle minor differences in clocks on your database servers and/or instances when your script doesn't execute exactly on the minute.

It may also be possible to write this using OLAP windowing functions, but I'm not sure it would be any more efficient.



For the second problem you may want to look at using the LAG() function so you can calculate the delta in the log record:

select 
    databasename
   ,logrecordnumber
   ,logtimestamp
   ,logrecordnumber - lag(logrecordnumber,1) over (partition by database order by logtimestamp) as logrecordnumber_growth
from 
    MyTable
where 
    logtimestamp &gt; current timestamp - 42 days
    and dayofweek(logtimestamp) = 0
    and time(logtimestamp) between '11:59:30' and '12:00:30'


This example adds a calculation showing how much the logrecordnumber has grown since the week before.  

Doing the rest of the calculation (extrapolating to when LSNs might run out) is left as an exercise for the OP.