boomer77mim + weth sushiswap balance
Updated 2022-02-07
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
with raw as (select *
from ethereum.erc20_balances
where user_address = lower('0x07d5695a24904cc1b6e3bd57cc7780b90618e3c4') and balance_date >= '2022-01-23' and symbol in ('WETH', 'MIM')
),
price as (select date_trunc('day', hour) as dt, avg(price) as price, symbol
from ethereum.token_prices_hourly
where symbol in ('MIM', 'WETH')
group by 1,3)
select a.balance_date, a.symbol, a.balance, b.price, (a.balance*b.price) as liquidity_usd
from raw a
left join price b on a.balance_date = b.dt and a.symbol = b.symbol
Run a query to Download Data