Skip to content

Instantly share code, notes, and snippets.

@jdwyah
Created June 1, 2017 16:38
Show Gist options
  • Save jdwyah/795880b9b5ff19c227b2ac63f94bc46f to your computer and use it in GitHub Desktop.
Save jdwyah/795880b9b5ff19c227b2ac63f94bc46f to your computer and use it in GitHub Desktop.
WITH first_exposures AS (
SELECT
tracking_id,
created_at,
event,
experiment_test,
experiment_result,
date_trunc('day', created_at) AS day
FROM warehouse.events
WHERE category = 'experiment'
AND created_at > '10-13-16'
),
conversions_order_placed_1 AS (SELECT
tracking_id,
created_at
FROM warehouse.events
WHERE event_name = 'Order: order-placed-1'
GROUP BY 1, 2
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment