afonsoUntitled Query
Updated 2023-01-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
select
date_trunc('day', b.block_timestamp)::date as day,
count(distinct a.tx_hash) as stakes_count,
count(distinct tx_signer) as stakers_count,
sum(stakes_count) over (order by day) as cumulative_stakes_count,
sum(stakers_count) over (order by day) as cumulative_stakers_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
order by day
Run a query to Download Data