jackguyThe Law Offices of NEAR 7 copy
Updated 2023-03-27
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
›
⌄
-- forked from d59aa870-a646-4f75-a821-85eafe13afe3
with top25 as (
select
PERMISSION:FunctionCall:receiver_id as id,
count(DISTINCT TX_HASH) as transactions
from near.core.fact_actions_events_addkey
--WHERE block_timestamp > CURRENT_DATE - 90
where not id is NULL
group by 1
ORDER by 2 DESC
LIMIT 25
), tab2 as (
select
date_trunc('day', block_timestamp) as day,
count(DISTINCT TX_HASH) as transactions
from near.core.fact_actions_events_addkey
--WHERE block_timestamp > CURRENT_DATE - 90
where not PERMISSION:FunctionCall:receiver_id is NULL
group by 1
), tab3 as (
SELECT
day,
amount as new_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
Run a query to Download Data