Afonso_Diaztop new conreacts (txs)
Updated 2024-10-22
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
31
32
33
34
35
36
›
⌄
with
new_contracts as (
select
receiver_id as contract_address,
block_timestamp as created_at
from near.core.fact_actions_events
where action_name = 'DeployContract'
having created_at >= current_date - interval '1 month'
),
transactions as (
select
tx_hash,
block_timestamp,
receiver_id as contract_address,
tx_signer as user,
transaction_fee / 1e24 as tx_fee
from near.core.fact_actions_events_function_call
join near.core.fact_transactions
using (tx_hash)
where contract_address in (select distinct contract_address from new_contracts)
and block_timestamp::date >= current_date - interval '1 month'
)
select
contract_address,
count(distinct tx_hash) as transactions,
count(distinct user) as users,
sum(tx_fee) as total_fee
from transactions
group by 1
order by total_fee desc
limit 10
QueryRunArchived: QueryRun has been archived