Created
June 1, 2017 16:38
-
-
Save jdwyah/71bd98a11dfab56b3cdb3c449615e95a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cumulative AS ( | |
SELECT | |
DAY, | |
experiment_test, | |
experiment_result, | |
exposures, | |
sum(exposures) | |
OVER ( | |
PARTITION BY experiment_test, experiment_result | |
ORDER BY DAY | |
ROWS UNBOUNDED PRECEDING ) cumulative_exposures, | |
order_placed_1, | |
sum(order_placed_1) | |
OVER ( | |
PARTITION BY experiment_test, experiment_result | |
ORDER BY DAY | |
ROWS UNBOUNDED PRECEDING ) cumulative_order_placed_1 | |
FROM results | |
ORDER BY experiment_test, experiment_result, DAY | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment