ArioMUX Distribution of Users by # Active Days
Updated 2024-04-08
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
›
⌄
with User_stats as (
select
distinct from_address as User_address,
count (Distinct date_trunc(day, block_timestamp)) as "# Active Days"
from
avalanche.core.fact_transactions
where
to_address = '0x5898c3e218a8501533d771c86e2fa37743ea2add'
and STATUS = 'SUCCESS'
group by
1
)
select
case
when "# Active Days" = 1 then 'A: 1 Day'
when "# Active Days" > 1
and "# Active Days" <= 10 then 'B: 1-10 Days'
when "# Active Days" > 10
and "# Active Days" <= 30 then 'C: 10-30 Days'
when "# Active Days" > 30
and "# Active Days" <= 60 then 'D: 30-60 Days'
when "# Active Days" > 60
and "# Active Days" <= 90 then 'E: 60-90 Days'
when "# Active Days" > 90
and "# Active Days" <= 180 then 'E: 90-180 Days'
else 'F: > 180 Days'
end as Status,
count(distinct User_address) as "# Users"
from
User_stats
group by
1
QueryRunArchived: QueryRun has been archived