mlhUntitled Query
Updated 2022-08-02Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with contracts as (
SELECT *
from (SELECT min(a.BLOCK_TIMESTAMP) as dates,
RECEIVER_ID
from near.core.fact_actions_events a
join near.core.fact_receipts b on a.TX_HASH = b.TX_HASH
where ACTION_NAME= 'DeployContract'
GROUP by 2
)
where dates >= '2022-01-01'
)
SELECT TX_RECEIVER as contract,
COUNT(DISTINCT TX_HASH) as txs,
COUNT(DISTINCT TX_SIGNER) as signers
from near.core.fact_transactions
where date(BLOCK_TIMESTAMP) >= '2022-01-01'
and TX_RECEIVER in (
SELECT RECEIVER_ID
from contracts
)
GROUP by 1
ORDER by 2 DESC
limit 10
Run a query to Download Data