purple-art-11901
06/23/2025, 7:16 PMdazzling-refrigerator-96533
06/24/2025, 5:50 PM__banditPeriodWeights AS (
SELECT
bps.bandit_period,
bps.dimension,
SUM(bps.users) / MAX(dt.total_users) AS weight
FROM
__banditPeriodStatistics bps
LEFT JOIN __dimensionTotals dt ON (bps.dimension = dt.dimension)
GROUP BY
bps.bandit_period,
bps.dimension
)
Where the bps.users
is magnitudes smaller than dt.total_users
so the weight is 0 and that makes main_sum
0 as well. What's cocnfusing to me is that this seems to be expected though since total_users
is the sum of users
for all the periodspurple-art-11901
06/25/2025, 2:23 PMhelpful-application-7107
06/25/2025, 3:44 PMhelpful-application-7107
06/25/2025, 3:45 PMhelpful-application-7107
06/25/2025, 3:47 PM__userMetricAgg
and return that in Redshift? Do you see users with any conversion rates there?dazzling-refrigerator-96533
06/25/2025, 3:50 PMSUM(bps.users)::FLOAT / MAX(dt.total_users) AS weight
makes the weights seem normal. We're indeed using Redshift, I'll copy some data when I have a chance here for debugginghelpful-application-7107
06/25/2025, 3:54 PMhelpful-application-7107
06/25/2025, 3:54 PMCould it be an issue of it being an int division instead of float? I ran manually and doingI'm pretty sure we ran tests on our redshift set up, but let me check.makes the weights seem normal.SUM(bps.users)::FLOAT / MAX(dt.total_users) AS weight
helpful-application-7107
06/25/2025, 5:33 PMhelpful-application-7107
06/25/2025, 6:04 PMdazzling-refrigerator-96533
06/25/2025, 6:11 PMpurple-art-11901
06/25/2025, 6:54 PM