From a6be5e302662b3a90f68da0e3fdfa6ff271c168e Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Tue, 31 Oct 2023 12:15:20 +0100 Subject: [PATCH] Add order by to base query in 24h hourly intervals --- lib/plausible/stats/clickhouse.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plausible/stats/clickhouse.ex b/lib/plausible/stats/clickhouse.ex index f3158dc41..e1f72c790 100644 --- a/lib/plausible/stats/clickhouse.ex +++ b/lib/plausible/stats/clickhouse.ex @@ -249,6 +249,7 @@ defmodule Plausible.Stats.Clickhouse do timestamp: min(e.timestamp), _sample_factor: e._sample_factor }, + order_by: [e.site_id, e.user_id], group_by: [e.site_id, e.user_id, e._sample_factor] )