jake-wolfEth Derivatives Lido staking part 1:1
Updated 2022-09-09Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
›
⌄
select avg(amount) over (order by days
rows between 2 preceding and current row) as day3sum,
avg(amount) over (order by days
rows between 13 preceding and current row) as day14sum,
days,
avg(sales) over (order by days
rows between 2 preceding and current row) as day3sales,
avg(sales) over (order by days
rows between 13 preceding and current row) as day14sales,
uniuse
from
(
select
sum(event_inputs:value / pow(10,18)) as amount,
count(origin_from_address) as sales,
date_trunc('day', block_timestamp) as days,
count(distinct origin_from_address) as uniuse
from ethereum.core.fact_event_logs
where contract_address like lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
and origin_to_address like lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84')-- lido
and event_inputs:value is not null -- must have value
and event_name like 'Transfer' -- staking method
and block_timestamp like '2022%'
group by 3)
Run a query to Download Data