Report not found

There was a problem finding this report.

Report

Churned Customer Behavior

Churned Customer behavior
July 6, 2016 · Refreshed almost 3 years ago
Description
This report shows the average life time value of each churned customer in addition to where they came from and how they behaved in product.

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 utm_source, Round(SUM(order_total) :: DECIMAL, 2) AS churned_customer_total_value, Round(Count(DISTINCT order_id) :: DECIMAL / Count(DISTINCT user_id), 2) AS avg_orders_per_user, Round(SUM(order_total) :: DECIMAL / Count(DISTINCT first_touch.identity), 2) AS avg_ltv FROM first_touch join heap.TRANSACTION ON customer_id = first_touch.identity join heap.account_modification ON first_touch.identity = heap.account_modification.identity WHERE account_change = 'cancel' AND utm_source IS NOT NULL 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 utm_source, Round(SUM(order_total) :: DECIMAL, 2) AS churned_customer_total_value, Round(Count(DISTINCT order_id) :: DECIMAL / Count(DISTINCT user_id), 2) AS avg_orders_per_user, Round(SUM(order_total) :: DECIMAL / Count(DISTINCT first_touch.identity), 2) AS avg_ltv FROM first_touch join heap.TRANSACTION ON customer_id = first_touch.identity join heap.account_modification ON first_touch.identity = heap.account_modification.identity WHERE account_change = 'cancel' AND utm_source IS NOT NULL GROUP BY 1
<div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <div class="mode-grid container"> <div class="row"> <div class="col-md-12"> <mode-table id="table_9abc58d9d7c6" 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