Report not found

There was a problem finding this report.
Mapping every Event to a Session - Step 1
March 19, 2015 · Refreshed almost 4 years ago
Description
The first step in finding mapping every event in an event stream to a session.

Collaborators

Run History
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, LAG(occurred_at,1) OVER (PARTITION BY user_id ORDER BY occurred_at) AS last_event FROM tutorial.playbook_events ) last LIMIT 100
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, LAG(occurred_at,1) OVER (PARTITION BY user_id ORDER BY occurred_at) AS last_event FROM tutorial.playbook_events ) last 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_5b10a8ab3003" 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