davidwallUntitled Query
Updated 2023-01-14
99
1
2
3
4
5
6
7
8
9
10
›
⌄
--credit : https://app.flipsidecrypto.com/velocity/queries/ae830625-2edb-48f3-b81d-97ec8939c2ab
select 'Stake' as type, trunc(block_timestamp,'month') as date, POOL_ADDRESS, count(DISTINCT(tx_signer)) as user, count(DISTINCT(tx_hash)) as total_tx,
sum(stake_amount/pow(10,24)) as total_stake, avg(stake_amount/pow(10,24)) as avg_amount, max((stake_amount/pow(10,24))) as max_amount,
min((stake_amount/pow(10,24))) as min_amount, median(stake_amount/pow(10,24)) as median_amount,
sum(total_stake) over (partition by pool_address order by date asc ) as cum_stake
from near.core.dim_staking_actions
where block_timestamp >= '2022-07-01'
and action = 'Stake'
group by 1,2,3
having total_tx > 25
Run a query to Download Data