diff --git a/configs/queries/analyze-recent-commits/template.sql b/configs/queries/analyze-recent-commits/template.sql index f01676d3b0..9f32704e12 100644 --- a/configs/queries/analyze-recent-commits/template.sql +++ b/configs/queries/analyze-recent-commits/template.sql @@ -6,8 +6,8 @@ WITH RECURSIVE seq(idx, current_period_day, last_period_day) AS ( UNION ALL SELECT idx + 1 AS idx, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 day) AS current_period_day, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 + 28 day) AS last_period_day + DATE_SUB(CURRENT_DATE(), INTERVAL idx day) AS current_period_day, + DATE_SUB(CURRENT_DATE(), INTERVAL idx + 28 day) AS last_period_day FROM seq WHERE idx < 28 ), group_by_day AS ( diff --git a/configs/queries/analyze-recent-issues/template.sql b/configs/queries/analyze-recent-issues/template.sql index 4b4fe0a9da..f4e18d6474 100644 --- a/configs/queries/analyze-recent-issues/template.sql +++ b/configs/queries/analyze-recent-issues/template.sql @@ -6,8 +6,8 @@ WITH RECURSIVE seq(idx, current_period_day, last_period_day) AS ( UNION ALL SELECT idx + 1 AS idx, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 day) AS current_period_day, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 + 28 day) AS last_period_day + DATE_SUB(CURRENT_DATE(), INTERVAL idx day) AS current_period_day, + DATE_SUB(CURRENT_DATE(), INTERVAL idx + 28 day) AS last_period_day FROM seq WHERE idx < 28 ), opened_issues_group_by_day AS ( diff --git a/configs/queries/analyze-recent-pull-requests/template.sql b/configs/queries/analyze-recent-pull-requests/template.sql index 9f2ce908f7..0a7894da65 100644 --- a/configs/queries/analyze-recent-pull-requests/template.sql +++ b/configs/queries/analyze-recent-pull-requests/template.sql @@ -6,8 +6,8 @@ WITH RECURSIVE seq(idx, current_period_day, last_period_day) AS ( UNION ALL SELECT idx + 1 AS idx, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 day) AS current_period_day, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 + 28 day) AS last_period_day + DATE_SUB(CURRENT_DATE(), INTERVAL idx day) AS current_period_day, + DATE_SUB(CURRENT_DATE(), INTERVAL idx + 28 day) AS last_period_day FROM seq WHERE idx < 28 ), opened_prs_group_by_day AS ( diff --git a/configs/queries/analyze-recent-stars/template.sql b/configs/queries/analyze-recent-stars/template.sql index 0dcd343ec2..5e06d4f50a 100644 --- a/configs/queries/analyze-recent-stars/template.sql +++ b/configs/queries/analyze-recent-stars/template.sql @@ -6,8 +6,8 @@ WITH RECURSIVE seq(idx, current_period_day, last_period_day) AS ( UNION ALL SELECT idx + 1 AS idx, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 day) AS current_period_day, - DATE_SUB(CURRENT_DATE(), INTERVAL idx + 1 + 28 day) AS last_period_day + DATE_SUB(CURRENT_DATE(), INTERVAL idx day) AS current_period_day, + DATE_SUB(CURRENT_DATE(), INTERVAL idx + 28 day) AS last_period_day FROM seq WHERE idx < 28 ), group_by_day AS (