rackhaelUntitled Query
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
›
⌄
with table1 as (select near.core.fact_actions_events.block_timestamp as date,
receiver_id,
row_number() over (partition by receiver_id order by date asc) as cum
from near.core.fact_actions_events join near.core.fact_receipts
on near.core.fact_receipts.tx_hash = near.core.fact_actions_events.tx_hash
where action_name ilike '%DEPLOYCONTRACT%'
group by 1, 2
qualify cum = 1)
select count(receiver_id) as total,
date_trunc('DAY', date) as days,
sum(total) over (order by days asc) as cum_number_of_contracts
from table1
group by 2
order by 1
select
count(distinct TX_RECEIVER) as smart_num,
near.core.fact_actions_events.BLOCK_TIMESTAMP:: DATE as date,
CASE WHEN date >= '2023-01-10' THEN ' early 7 day'
WHEN date < '2023-01-10' THEN 'last 7 days ' END AS range
from near.core.fact_actions_events
INNER join near.core.fact_transactions on near.core.fact_transactions.tx_hash = near.core.fact_actions_events.tx_hash
where action_name = 'DeployContract'
and date >= CURRENT_DATE - 13
group by range,date
Run a query to Download Data