Report not found

There was a problem finding this report.
Sessions with Likes
March 19, 2015 · Refreshed 4 months ago
Description
The number of sessions with likes.

Collaborators

Run History
SELECT sessions, sessions_with_likes, sessions_with_likes/sessions::FLOAT AS percent_of_sessions_with_likes FROM ( SELECT COUNT(DISTINCT global_session_id) AS sessions, COUNT(DISTINCT CASE WHEN event_name = 'like_message' THEN global_session_id ELSE NULL END) AS sessions_with_likes FROM ( SELECT user_id, occurred_at, event_name, SUM(is_new_session) OVER (ORDER BY user_id, occurred_at) AS global_session_id, SUM(is_new_session) OVER (PARTITION BY user_id ORDER BY occurred_at) AS user_session_id FROM ( SELECT *, CASE WHEN EXTRACT('EPOCH' FROM occurred_at) - EXTRACT('EPOCH' FROM last_event) >= (60 * 10) OR last_event IS NULL THEN 1 ELSE 0 END AS is_new_session FROM ( SELECT user_id, occurred_at, event_name, LAG(occurred_at,1) OVER (PARTITION BY user_id ORDER BY occurred_at) AS last_event FROM tutorial.playbook_events ) last ) final ) session ) agg LIMIT 100
SELECT sessions, sessions_with_likes, sessions_with_likes/sessions::FLOAT AS percent_of_sessions_with_likes FROM ( SELECT COUNT(DISTINCT global_session_id) AS sessions, COUNT(DISTINCT CASE WHEN event_name = 'like_message' THEN global_session_id ELSE NULL END) AS sessions_with_likes FROM ( SELECT user_id, occurred_at, event_name, SUM(is_new_session) OVER (ORDER BY user_id, occurred_at) AS global_session_id, SUM(is_new_session) OVER (PARTITION BY user_id ORDER BY occurred_at) AS user_session_id FROM ( SELECT *, CASE WHEN EXTRACT('EPOCH' FROM occurred_at) - EXTRACT('EPOCH' FROM last_event) >= (60 * 10) OR last_event IS NULL THEN 1 ELSE 0 END AS is_new_session FROM ( SELECT user_id, occurred_at, event_name, LAG(occurred_at,1) OVER (PARTITION BY user_id ORDER BY occurred_at) AS last_event FROM tutorial.playbook_events ) last ) final ) session ) agg LIMIT 100
<div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <div class="container mode-grid"> <div class="row"> <div class="col-md-12"> <mode-table id="table_e17a5ffdea23" 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