Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CREATE TABLE NUM_OF_SPINS AS
SELECT anonymous_id
SUM(RUDDER.spin.no_of_spins) as no_of_spins
FROM
SIGNUP_DATE_TABLE,
FIRST_REV_DATE_TABLE,
RUDDER.spin table
WHERE
SIGNUP_DATE_TABLE.anonymous_id = RUDDER.spin_table.anonymous_id
AND SIGNUP_DATE_TABLE.anonymous_id = RUDDER.spin_table.anonymous_id
AND FIRST_REV_DATE.first_rev_date >= RUDDER.spin_table.sent_at
GROUP BY anonymous_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment