afonsoUntitled Query
Updated 2023-01-20Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with t as (
select
b.block_timestamp::date as day,
count(distinct a.tx_hash) as unstakes_count,
count(distinct tx_signer) as unstakers_count
from near.core.fact_receipts a,
lateral flatten(input => logs) c
join near.core.fact_transactions b
where c.value ilike any ('%unstaking%', '%withdrawing%')
and b.block_timestamp >= '2022-12-01'
and a.tx_hash = b.tx_hash
group by day
)
select
avg(unstakes_count) as average_unstakes_count,
avg(unstakers_count) as average_unstakers_count
from t
Run a query to Download Data