Alexaymin/mean/max/median
Updated 2022-09-04Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
⌄
/*
with user_stats as ( select origin_from_address as stakers, count(tx_hash) as deposits, sum (event_inputs:value/ power(10,18)) as eth_staked
from ethereum.core.fact_event_logs
where contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
and event_inputs:from = '0x0000000000000000000000000000000000000000' -- minted
and event_inputs:value <> '0'
group by stakers
order by eth_staked desc)
select min(eth_staked), max(eth_staked), avg(eth_staked), median(eth_staked)
from user_stats
*/
select min(event_inputs:value/ power(10,18)), max(event_inputs:value/ power(10,18)), median(event_inputs:value/ power(10,18)), avg(event_inputs:value/ power(10,18))
from ethereum.core.fact_event_logs
where contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
and event_inputs:from = '0x0000000000000000000000000000000000000000' -- minted
and event_inputs:value <> '0'
Run a query to Download Data