Afonso_Diaz2023-03-24 01:23 AM
Updated 2023-03-23
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 t0 as (
select
tx_receiver as contract_address,
min(block_timestamp) as min_date
from near.core.fact_actions_events a
join near.core.fact_transactions b
using(tx_hash)
where action_name = 'DeployContract'
group by 1
having min_date >= '2022-12-01'
),
t as (
select
tx_receiver as contract_address,
count(distinct tx_hash) as transactions,
count(distinct tx_signer) as users
from near.core.fact_transactions
where tx_status = 'Success'
and tx_receiver in (select contract_address from t0)
and block_timestamp >= '2022-12-01'
group by 1
order by 3 desc
limit 5
),
t2 as (
select
tx_signer as user,
count(distinct tx_hash) as transactions,
count(distinct block_timestamp::date) as active_days
from near.core.fact_transactions
where tx_status = 'Success'
and tx_receiver in (select contract_address from t)
group by 1
)
Run a query to Download Data