Rather than using a fancy query to pull stats over a rolling window from the DB, this PR adds a DB fn to query stats for a single 14-day window from the db and write them to an aggregated stats table. We can then access them from the aggregated stats table the same way we access aggregated stats from our scans of the top million domains.
Rather than using a fancy query to pull stats over a rolling window from the DB, this PR adds a DB fn to query stats for a single 14-day window from the db and write them to an aggregated stats table. We can then access them from the aggregated stats table the same way we access aggregated stats from our scans of the top million domains.
Fixes #235
Depends on #237