From ea8e7f3e9d994189bfa3f2e3486fffad9c22adb1 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 27 Feb 2024 11:25:12 -0500 Subject: [PATCH] Align `TagServersMeasure` query style with other classes (#29414) --- app/lib/admin/metrics/measure/tag_servers_measure.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/admin/metrics/measure/tag_servers_measure.rb b/app/lib/admin/metrics/measure/tag_servers_measure.rb index e6378b8021..6eb46bca45 100644 --- a/app/lib/admin/metrics/measure/tag_servers_measure.rb +++ b/app/lib/admin/metrics/measure/tag_servers_measure.rb @@ -34,10 +34,10 @@ class Admin::Metrics::Measure::TagServersMeasure < Admin::Metrics::Measure::Base INNER JOIN accounts ON statuses.account_id = accounts.id WHERE statuses_tags.tag_id = :tag_id AND statuses.id BETWEEN :earliest_status_id AND :latest_status_id - AND date_trunc('day', statuses.created_at)::date = axis.day + AND date_trunc('day', statuses.created_at)::date = axis.period ) FROM ( - SELECT generate_series(date_trunc('day', :start_at::timestamp)::date, date_trunc('day', :end_at::timestamp)::date, ('1 day')::interval) AS day + SELECT generate_series(date_trunc('day', :start_at::timestamp)::date, date_trunc('day', :end_at::timestamp)::date, interval '1 day') AS period ) as axis SQL end