Afonso_Diaz2023-02-03 03:00 PM
Updated 2023-02-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with t1 as (
select tx_sender,
count (distinct tx_id) as txns_count,
count (distinct block_timestamp::date) as active_days_count
from terra.core.fact_transactions
where fee_denom = 'uluna'
group by 1
)
select
case
when active_days_count = 1 then '1 Day'
when active_days_count <= 10 then 'Between 1 - 10 Days'
when active_days_count <= 30 then 'Between 10 - 30 Days'
when active_days_count <= 60 then 'Between 30 - 60 Days'
when active_days_count <= 90 then 'Between 60 - 90 Days'
else 'More Than 90 Days' end as type,
count (distinct tx_sender) as users_count
from t1
group by 1
Run a query to Download Data