Report not found

There was a problem finding this report.
ARPU by UTM Source
July 6, 2016 · Refreshed almost 3 years ago
Description
This query combine's Heap session data with transactional data.

Collaborators

Run History
WITH first_touch AS (SELECT all_sessions.user_id, identity, first_session.first_time AS first_seen, utm_source --add any user level properties or session level properties here FROM heap.sessions AS all_sessions inner join (SELECT user_id, Min(TIME) AS first_time FROM heap.sessions GROUP BY user_id) AS first_session ON all_sessions.user_id = first_session.user_id AND all_sessions.TIME = first_session.first_time inner join heap.users AS users ON all_sessions.user_id = users.user_id) SELECT CASE WHEN utm_source IS NULL THEN 'none' ELSE utm_source END, Round(SUM(order_total) :: DECIMAL, 2) AS total_revenue, Round(SUM(order_total) :: DECIMAL / Count(DISTINCT customer_id) :: DECIMAL, 2) AS avg_per_customer FROM heap.TRANSACTION join first_touch ON customer_id = identity GROUP BY 1 LIMIT 100
WITH first_touch AS (SELECT all_sessions.user_id, identity, first_session.first_time AS first_seen, utm_source --add any user level properties or session level properties here FROM heap.sessions AS all_sessions inner join (SELECT user_id, Min(TIME) AS first_time FROM heap.sessions GROUP BY user_id) AS first_session ON all_sessions.user_id = first_session.user_id AND all_sessions.TIME = first_session.first_time inner join heap.users AS users ON all_sessions.user_id = users.user_id) SELECT CASE WHEN utm_source IS NULL THEN 'none' ELSE utm_source END, Round(SUM(order_total) :: DECIMAL, 2) AS total_revenue, Round(SUM(order_total) :: DECIMAL / Count(DISTINCT customer_id) :: DECIMAL, 2) AS avg_per_customer FROM heap.TRANSACTION join first_touch ON customer_id = identity GROUP BY 1
<div class="mode-header"> <h1 class='embed-hidden'>{{ title }}</h1> <p>{{ description }}</p> </div> <div class="mode-grid container"> <div class="row"> <div class="col-md-12"> <mode-table id="table_e42abe4dee68" dataset="dataset" options="table_options"></mode-table> </div> </div> </div>
{{ dataSourceName(params.queryId) }}

The dataset is too large to view in browser

Export

Looks like something went wrong with your query.

{{ DS.queryRuns[params.queryId].errorMessage }}
This query was cancelled