cypherUntitled Query
Updated 2022-12-28
99
1
2
3
4
5
6
7
8
9
10
11
›
⌄
SELECT
COUNT(DISTINCT tx_signer) as number_of_stakers,
COUNT(DISTINCT a.TX_HASH) as number_transactions,
SUM(b.tx:actions[0]:FunctionCall:deposit/pow(10,24)) amount_near_staked,
SUM(b.tx:actions[0]:FunctionCall:deposit/pow(10,24))/COUNT(DISTINCT tx_signer) as near_per_staker
FROM near.core.fact_actions_events_function_call a
JOIN near.core.fact_transactions b
ON a.tx_hash = b.tx_hash
WHERE method_name = 'deposit_and_stake'
AND b.block_timestamp::date < CURRENT_DATE
AND a.block_timestamp::date < CURRENT_DATE
Run a query to Download Data