jackguyThe Law Offices of NEAR
Updated 2023-04-12
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
›
⌄
SELECT
day,
amount as new_contracts,
sum(amount) over (order by day) as total_contracts
FROM (
select
min_day as day,
count(*) as amount
from (
select
PERMISSION:FunctionCall:receiver_id as id,
min(date_trunc('day', block_timestamp)) as min_day
from near.core.fact_actions_events_addkey
WHERE tx_hash in (
SELECT
DISTINCT tx_hash
FROM near.core.fact_actions_events
WHERE ACTION_NAME = 'DeployContract'
)
group by 1
--having min_day > CURRENT_DATE - 90
)
group by 1
)
Run a query to Download Data