Apply rounding and casting to sampled visits

pull/3969/head
Adrian Gruntkowski 3 years ago
parent e6d711eac6
commit cac73a4721

@ -202,7 +202,10 @@ defmodule Plausible.Exports do
date(e.timestamp),
selected_as(fragment("any(?)", e.hostname), :hostname),
selected_as(e.pathname, :page),
selected_as(fragment("uniq(?) * any(_sample_factor)", e.session_id), :visits),
selected_as(
fragment("toUInt64(round(uniq(?)*any(_sample_factor)))", e.session_id),
:visits
),
visitors(e),
selected_as(
fragment("toUInt64(round(countIf(?='pageview')*any(_sample_factor)))", e.name),

Loading…
Cancel
Save