<?php
$fields = Array(
'viewers' => Array('title' => 'Viewers', 'type'=> 'select', 'field' => 'count(distinct(v.systemid)) as `viewers`'),
'views' => Array('title' => 'Views', 'type'=> 'select', 'field' => 'count(v.viewid) as `views`'),
'totalDuration' => Array('title'=> 'Total View Length', 'type'=> 'select', 'field' => 'sum(TIMESTAMPDIFF(SECOND,v.ts,v.ts_end)) as `total duration`'),
'avgDuration' => Array('title'=> 'Avg view length', 'type'=> 'select', 'field' => '(sum(TIMESTAMPDIFF(SECOND,v.ts,v.ts_end)) / count(v.viewid)) as `average duration`'),
'clipname' => Array('title'=>'Video ID', 'type'=> 'group', 'field' => 'v.clipname as `clipname`'),
'startDate' => Array('title'=>'Actual Start Date', 'type'=> 'group', 'field' => 'p.startDate'),
'startTime' => Array('title'=>'Actual Start Time', 'type'=> 'group', 'field' => 'p.startTime'),
'date' => Array('title'=>'Date', 'type'=> 'group', 'field' => 'DATE(v.ts) AS ForDate'),
'stage' => Array('title'=>'Player State', 'type'=> 'group', 'field' => 'v.stage'),
'platform' => Array('title'=>'OS', 'type'=> 'group', 'field' => 's.platform'),
'browser' => Array('title'=>'Browser', 'type'=> 'group', 'field' => 's.browser'),
'alias' => Array('title'=>'Alias', 'type'=> 'group', 'field' => 'p.alias'),
'house' => Array('title'=>'House', 'type'=> 'group', 'field' => 'p.house'),
'business' => Array('title'=>'Business', 'type'=> 'group', 'field' => 'p.business'),
'eventType' => Array('title'=>'Event Type', 'type'=> 'group', 'field' => 'p.eventType'),
'title' => Array('title'=>'Title', 'type'=> 'group', 'field' => 'p.title')
);
print_r($fields);
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- Array
(
[viewers] => Array
(
[title] => Viewers
[type] => select
[field] => count(distinct(v.systemid)) as `viewers`
)
[views] => Array
(
[title] => Views
[type] => select
[field] => count(v.viewid) as `views`
)
[totalDuration] => Array
(
[title] => Total View Length
[type] => select
[field] => sum(TIMESTAMPDIFF(SECOND,v.ts,v.ts_end)) as `total duration`
)
[avgDuration] => Array
(
[title] => Avg view length
[type] => select
[field] => (sum(TIMESTAMPDIFF(SECOND,v.ts,v.ts_end)) / count(v.viewid)) as `average duration`
)
[clipname] => Array
(
[title] => Video ID
[type] => group
[field] => v.clipname as `clipname`
)
[startDate] => Array
(
[title] => Actual Start Date
[type] => group
[field] => p.startDate
)
[startTime] => Array
(
[title] => Actual Start Time
[type] => group
[field] => p.startTime
)
[date] => Array
(
[title] => Date
[type] => group
[field] => DATE(v.ts) AS ForDate
)
[stage] => Array
(
[title] => Player State
[type] => group
[field] => v.stage
)
[platform] => Array
(
[title] => OS
[type] => group
[field] => s.platform
)
[browser] => Array
(
[title] => Browser
[type] => group
[field] => s.browser
)
[alias] => Array
(
[title] => Alias
[type] => group
[field] => p.alias
)
[house] => Array
(
[title] => House
[type] => group
[field] => p.house
)
[business] => Array
(
[title] => Business
[type] => group
[field] => p.business
)
[eventType] => Array
(
[title] => Event Type
[type] => group
[field] => p.eventType
)
[title] => Array
(
[title] => Title
[type] => group
[field] => p.title
)
)
preferences:
236.16 ms | 414 KiB | 342 Q