KaskoazulOlympusDAO - 1. Staked vs unstaked OHM
Updated 2022-04-15
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
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with OHM as (
select balance_date as fecha,
sum(balance) as unstaked
from ethereum.erc20_balances
where contract_address = lower('0x64aa3364F17a4D01c6f1751Fd97C2BD3D7e7f1D5') --OHM v2
group by 1
order by 1
),
sOHM as (
select balance_date as fecha,
sum(balance) as staked
from ethereum.erc20_balances
where contract_address = lower('0x04906695D6D12CF5459975d7C3C03356E4Ccd460') --sOHM v2
group by 1
order by 1
),
OHM_price as (
select date_trunc('day', hour) as fecha,
avg(price) as price
from ethereum.token_prices_hourly
where token_address = lower('0x64aa3364F17a4D01c6f1751Fd97C2BD3D7e7f1D5') --OHM v2
group by 1
order by 1
),
sOHM_price as (
select date_trunc('day', hour) as fecha,
avg(price) as price
from ethereum.token_prices_hourly
where token_address = lower('0x04906695D6D12CF5459975d7C3C03356E4Ccd460') --sOHM v2
group by 1
order by 1
),
Run a query to Download Data