adambalanear
Updated 2022-08-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
28
29
30
31
32
33
34
35
›
⌄
with
contracts as (
select count(distinct tx_hash) as Contracts
from near.core.fact_actions_events
where Action_Name ='CreateAccount' and BLOCK_TIMESTAMP ::date >CURRENT_DATE-30)
,smarts as (
select count (distinct tx_hash) as smart
from near.core.fact_actions_events
where Action_Name ='DeployContract' and BLOCK_TIMESTAMP ::date >CURRENT_DATE-30)
,contract as (
select block_timestamp::date as date,
count (distinct tx_hash) as Contracts
from near.core.fact_actions_events
where Action_Name ='CreateAccount' and BLOCK_TIMESTAMP ::date >CURRENT_DATE-30
group by 1
)
,smart as (
select block_timestamp::date as date,
count (distinct TXN_HASH ) as smart
from flipside_prod_db.mdao_near.actions_events_function_call where METHOD_NAME ='new' and
ACTION_NAME='FunctionCall'and BLOCK_TIMESTAMP ::date >CURRENT_DATE-30
group by 1
),
top as (
select tx_receiver,
count (distinct tx_hash)
from near.core.fact_transactions where BLOCK_TIMESTAMP ::date >CURRENT_DATE-30
group by 1
order by 2 DESC
limit 5
)
select * from smart
Run a query to Download Data