Afonso_DiazUntitled Query
Updated 2023-01-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with t as (
select tx_sender as sender,
min(block_timestamp) as min_date
from terra.core.fact_transactions
group by 1
)
select a.block_timestamp::date as day,
iff(a.block_timestamp::date >= '2023-01-14', 'After Announcement', 'Before Announcement') as timespan,
count(distinct a.tx_sender) as active_wallets_count,
count(distinct t.sender) as new_wallets_count,
sum(active_wallets_count) over (order by day) as cumulative_active_wallets_count,
sum(new_wallets_count) over (order by day) as cumulative_new_wallets_count
from terra.core.fact_transactions a
left join t
on a.block_timestamp::date = min_date::date
where a.block_timestamp between date('2023-01-14') - interval '1 week' and date('2023-01-14') + interval '1 week'
group by 1, 2
order by 1
Run a query to Download Data