mlhNew NEAR Users4
Updated 2022-09-07Copy 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
24
25
26
27
28
29
30
31
32
33
›
⌄
with new_user as (select tx_signer as new_user,
min (block_timestamp) as join_date
from near.core.fact_transactions
where block_timestamp::date >= CURRENT_DATE - 90
and tx_signer not in (select tx_signer
from (select tx_signer,
min (block_timestamp) as join_date
from near.core.fact_transactions
where block_timestamp::date <= CURRENT_DATE - 90
group by 1
)
)
group by 1
),
trxs as (select tx_hash,
a.tx_signer
from flipside_prod_db.mdao_near.transactions a
join new_user b on a.tx_signer = b.new_user
and a.block_timestamp > b.join_date
where block_timestamp::date >= CURRENT_DATE - 90
)
select method_name as action,
count (distinct a.tx_signer) as users,
count (distinct a.tx_hash) as trxs
from trxs a
join near.core.fact_actions_events_function_call b on a.tx_hash = b.tx_hash
where b.block_timestamp::date >= CURRENT_DATE - 90
group by 1
order by 2 DESC
limit 10
Run a query to Download Data