rajsArbitrum Users
Updated 2023-04-13Copy Reference Fork
99
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
›
⌄
with new_users as
(
SELECT
from_address,
min(block_timestamp) as date_joined
from arbitrum.core.fact_transactions
group by 1
)
,
new_users_sum as
(
SELECT
date_trunc('hour', date_joined) as date,
date_trunc('day', date_joined) as date_d,
date_trunc('month', date_joined) as date_m,
count(from_address) as no_of_new_users,
sum(count(from_address)) over (order by date) as cum_no_of_users
from new_users
group by 1,2,3
)
,
active_users as
(
SELECT
date_trunc('hour', block_timestamp) as date,
date_trunc('day', block_timestamp) as date_d,
date_trunc('month', block_timestamp) as date_m,
count(distinct from_address) as no_of_active_users
from arbitrum.core.fact_transactions
group by 1,2,3
)
SELECT
*
Run a query to Download Data