Report not found

There was a problem finding this report.

Report

Average Session Time

Average Session Time
June 14, 2016 · Refreshed 6 months ago
Description
Average session time based off first and last event

Collaborators

Run History
SELECT ROUND(AVG(duration), 4) as avg_minutes FROM( SELECT session_id || '-' || user_id AS "unique" ,MIN(time) AS "start" ,MAX(time) AS "last" ,EXTRACT(epoch FROM (MAX(time) - MIN(time)))::decimal/(3600) as duration -- Use this to calculate duration in redshift((DATEDIFF('milliseconds', MIN(time), MAX(time))::DECIMAL / 1000) / 60) AS "duration" FROM heap.all_events -- modify your date range here -- In Redshift time >= DATEADD('month', - 2, getDate()) to limit date GROUP BY 1 ) as session_time -- average for users who spend more than one minute on the site WHERE duration > 1
SELECT ROUND(AVG(duration), 4) as avg_minutes FROM( SELECT session_id || '-' || user_id AS "unique" ,MIN(time) AS "start" ,MAX(time) AS "last" ,EXTRACT(epoch FROM (MAX(time) - MIN(time)))::decimal/(3600) as duration -- Use this to calculate duration in redshift((DATEDIFF('milliseconds', MIN(time), MAX(time))::DECIMAL / 1000) / 60) AS "duration" FROM heap.all_events -- modify your date range here -- In Redshift time >= DATEADD('month', - 2, getDate()) to limit date GROUP BY 1 ) as session_time -- average for users who spend more than one minute on the site WHERE duration > 1
<div class="mode-header"> <h1 class='embed-hidden'>{{ title }}</h1> <p>{{ description }}</p> <p id="big_number"></p> </div> <script> document.getElementById('big_number').innerHTML=datasets[0].content[0].avg_minutes + " minutes"; </script> <style> #big_number{ font-size:36px; } </style> <div class="mode-grid container"></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