Metiocretop 20 contracts in projects list
Updated 2022-03-15
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 lst_wallets_90 as (
select tx_from[0] as wallet
,min(block_timestamp)::date as min_date
from terra.transactions
group by 1
having min_date>=CURRENT_DATE - 90
),
tx_ids as (
select tx_id, tx_from[0] as wallet
from terra.transactions join lst_wallets_90
on lst_wallets_90.wallet = tx_from[0]
-- where tx_status = 'true'
)
,
contracts as (
select m.msg_value:contract::string as contract , count(DISTINCT t.wallet) as total_wallets_interacted
from terra.msgs m , tx_ids t , terra.labels l
where l.address = contract and contract is not NULL
and m.tx_id = t.tx_id
and l.label is not NULL and l.label in ('anchor','terraswap','astroport','mirror','pylon','mars','prism','random earth')
group by 1
order by total_wallets_interacted desc
limit 20
)
select contract, label, total_wallets_interacted
from contracts, terra.labels
where contract=address
order by total_wallets_interacted desc
Run a query to Download Data