MLDZMNBTB11
Updated 2023-02-01
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
›
⌄
with t1 as (select
tx_sender,
min(block_timestamp) as first_txn,
count(date_trunc('day',block_timestamp)) as active_weeks
from terra.core.fact_transactions
group by 1
),
t2 as (select
distinct tx_sender
from t1 where active_weeks>{{Active_weeks}}
)
select
date_trunc('week',block_timestamp) as date,
case
when tx_sender in (select tx_sender from t2) then 'Active wallets' else 'Regular wallets'
end as gp,
sum(FEE) as total_paid_fee,
avg(fee) as average_fee,
median(fee) as median_fee,
count(distinct tx_sender) as no_wl
from terra.core.fact_transactions
group by 1,2
Run a query to Download Data