MLDZMNhe1
Updated 2023-11-25
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
›
⌄
with t1 as (select
distinct USER_ADDRESS as user
from ethereum.core.ez_current_balances
where CONTRACT_ADDRESS=lower('0x4bD70556ae3F8a6eC6C4080A0C327B24325438f3')
),
t2 as(
select
from_address as users,
Count(distinct tx_hash) as no_txn,
count (Distinct block_timestamp::Date) as active_days,
min (block_timestamp) as first_transaction,
datediff(day,first_transaction,CURRENT_DATE) as wallet_age
from ethereum.core.fact_transactions
where from_address in (select user from t1)
group by 1
)
select
case
when wallet_age<=20 then 'under 20 Days'
when wallet_age > 20 and wallet_age <= 50 then '20- 50 Days'
when wallet_age > 50 and wallet_age <= 100 then '50- 100 Days'
when wallet_age > 100 and wallet_age <= 365 then '100- 365 Days'
when wallet_age > 365 then 'over 365 Days'
end as gp,
count(distinct users) as no_users
from t2
group by 1
Run a query to Download Data