Skip to content

Instantly share code, notes, and snippets.

@jdwyah
Created June 1, 2017 16:39
Show Gist options
  • Save jdwyah/3b3971c3e44297e5e9596c342e06768b to your computer and use it in GitHub Desktop.
Save jdwyah/3b3971c3e44297e5e9596c342e06768b to your computer and use it in GitHub Desktop.
daily AS (
SELECT
experiment_arm.day,
experiment_arm.experiment_test,
experiment_arm.cumulative_exposures :: INT experiment_cumulative_exposures,
experiment_arm.cumulative_order_placed_1 :: INT experiment_cumulative_conversions,
control_arm.cumulative_exposures :: INT control_cumulative_exposures,
control_arm.cumulative_order_placed_1 :: INT control_cumulative_conversions
FROM cumulative experiment_arm
JOIN cumulative AS control_arm ON experiment_arm.day = control_arm.day
WHERE
experiment_arm.experiment_test = control_arm.experiment_test
AND experiment_arm.experiment_result <> 'control'
AND control_arm.experiment_result = 'control'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment