Moeuser1
Updated 2024-05-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with tb2 as (select
distinct CONTRACT,
count(distinct tx_hash) as no_txn,
count (Distinct TIMESTAMP::Date) as active_days
from external.tokenflow_starknet.decoded_transactions
group by 1
)
select
case
when no_txn = 1 then '1 time user'
when no_txn > 1 and no_txn < 3 then '2 times user'
when no_txn >= 3 and no_txn < 5 then '3-5 times user'
when no_txn >= 5 and no_txn < 10 then '5-10 times user'
when no_txn >= 10 then 'Over 10 times user'
end as user_type,
count(distinct CONTRACT) as no_users
from tb2
group by user_type having user_type is not null
QueryRunArchived: QueryRun has been archived