-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathauth0_top_browsers.pipe
More file actions
44 lines (41 loc) · 1.45 KB
/
auth0_top_browsers.pipe
File metadata and controls
44 lines (41 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
TOKEN "read" READ
TAGS "auth0"
NODE extract_browser
SQL >
%
SELECT
case
when match(event.data.user_agent::String, '(?i)firefox')
then 'Firefox'
when match(event.data.user_agent::String, '(?i)chrome|crios')
then 'Chrome'
when match(event.data.user_agent::String, '(?i)opera')
then 'Opera'
when match(event.data.user_agent::String, '(?i)msie|trident')
then 'Internet Explorer'
when match(event.data.user_agent::String, '(?i)iphone|ipad|safari')
then 'Safari'
else 'Unknown'
END as browser,
count(*) as request_count
FROM auth0
WHERE 1
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
AND event_time <= {{DateTime(date_to, '2025-01-01 23:59:59')}}
AND event.data.user_agent IS NOT NULL
{% if defined(event_type) %}
AND event_type = {{String(event_type)}}
{% end %}
{% if defined(client_name) %}
AND event.data.client_name::String = {{String(client_name)}}
{% end %}
{% if defined(connection_id) %}
AND event.data.connection_id::String = {{String(connection_id)}}
{% end %}
{% if defined(tenant_name) %}
AND event.data.tenant_name::String = {{String(tenant_name)}}
{% end %}
GROUP BY browser
ORDER BY request_count DESC
LIMIT 10
TYPE ENDPOINT