mariyaGrow rate of users (Normal VS without Anchor)
Updated 2022-05-08
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
30
›
⌄
with tb1 as(select
block_timestamp::date as day,
count(distinct t.TX_FROM[0]) as wallets_without_anchor,
sum(wallets_without_anchor) over (order by day) as grow_rate_without_anchor
from terra.transactions t join terra.labels l on t.TX_TO[0] = l.address
where t.block_timestamp>=CURRENT_DATE-90
and l.label_subtype != 'token_contract'
and l.label != 'anchor'
-- and l.LABEL_SUBTYPE='pool'
and t.TX_STATUS = 'SUCCEEDED'
group by 1),
tb2 as (select
block_timestamp::date as day,
count(distinct t.TX_FROM[0]) as total_wallets,
sum(total_wallets) over (order by day) as total_grow_rate
from terra.transactions t join terra.labels l on t.TX_TO[0] = l.address
where t.block_timestamp>=CURRENT_DATE-90
and l.label_subtype != 'token_contract'
--and l.label = 'anchor'
-- and l.LABEL_SUBTYPE='pool'
and t.TX_STATUS = 'SUCCEEDED'
group by 1)
select tb1.day as "day",
wallets_without_anchor,
total_wallets,
grow_rate_without_anchor,
total_grow_rate
from tb1 inner join tb2 on tb1.day=tb2.day
Run a query to Download Data