afonsoUntitled Query
Updated 2023-01-12Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
select
tx_receiver as pool,
count(distinct (tx_hash)) as stakes_count,
count(distinct (tx_signer)) as stakers_count,
sum(coalesce(tx:actions[0]:FunctionCall:deposit/pow(10,24), 0)) total_volume_staked,
avg(coalesce(tx:actions[0]:FunctionCall:deposit/pow(10,24), 0)) average_volume_staked
from near.core.fact_actions_events_function_call a
join near.core.fact_transactions b
using(tx_hash)
where method_name in ('deposit_and_stake')
and year(a.block_timestamp) = 2022
group by 1
order by stakes_count desc
limit 10
Run a query to Download Data