Skip to content

Commit 7d82768

Browse files
committed
cumulative signups
1 parent 5867913 commit 7d82768

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
TOKEN "read" READ
2+
3+
TAGS "auth0"
4+
5+
NODE cumulative_users_node
6+
SQL >
7+
%
8+
SELECT day, new_users, sum(new_users) OVER (ORDER BY day) as cumulative_users
9+
FROM
10+
(
11+
SELECT toDate(event_time) as day, uniqExact(event.data.user_name) as new_users
12+
FROM auth0
13+
WHERE event_type = 'ss' -- Successful signup
14+
{% if defined(client_id) and client_id != 'all' %}
15+
AND event.data.client_id::String = {{String(client_id)}}
16+
{% end %}
17+
{% if defined(connection_id) and connection_id != 'all' %}
18+
AND event.data.connection_id::String = {{String(connection_id)}}
19+
{% end %}
20+
{% if defined(tenant_name) and tenant_name != 'all' %}
21+
AND event.data.tenant_name::String = {{String(tenant_name)}}
22+
{% end %}
23+
GROUP BY day
24+
)
25+
ORDER BY day ASC

0 commit comments

Comments
 (0)