Carry _sample_factor from right side to left in join (#2962)

This commit is contained in:
Uku Taht 2023-05-24 14:23:35 +03:00 committed by GitHub
parent 1a94456586
commit 6be67bc6c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -424,7 +424,10 @@ defmodule Plausible.Stats.Base do
if Query.has_event_filters?(query) do
converted_sessions =
from(e in query_events(site, query),
select: %{session_id: fragment("DISTINCT ?", e.session_id)}
select: %{
session_id: fragment("DISTINCT ?", e.session_id),
_sample_factor: fragment("_sample_factor")
}
)
from(s in db_query,