Align TagServersMeasure query style with other classes (#29414)

This commit is contained in:
Matt Jankowski 2024-02-27 11:25:12 -05:00 committed by GitHub
parent 3b31447408
commit ea8e7f3e9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,10 +34,10 @@ class Admin::Metrics::Measure::TagServersMeasure < Admin::Metrics::Measure::Base
INNER JOIN accounts ON statuses.account_id = accounts.id INNER JOIN accounts ON statuses.account_id = accounts.id
WHERE statuses_tags.tag_id = :tag_id WHERE statuses_tags.tag_id = :tag_id
AND statuses.id BETWEEN :earliest_status_id AND :latest_status_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 ( 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 ) as axis
SQL SQL
end end