messariNEAR Activity by Contract Group
Updated 2023-07-03
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
›
⌄
with contracts as (
select
distinct t.tx_receiver as contract_address,
case
when l.project_name is not null then l.project_name
else t.tx_receiver
end as contract_group
from
near.core.fact_transactions t
left join
near.core.dim_address_labels l
on t.tx_receiver = l.address
)
select
date(t.block_timestamp) as date,
c.contract_group as contract_group,
count(distinct t.tx_hash) as transactions,
count(distinct t.tx_signer) as addresses
from
near.core.fact_transactions t
left join
contracts c
on t.tx_receiver = c.contract_address
where
date >= current_date - interval '{{Days}} days'
group by 1,2
order by 1 desc, 3 desc
Run a query to Download Data