jb199210
Updated 2022-10-25Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with poolstvl as (
select date as day,
currency as Pool,
sum (balance/pow(10,decimal)) as TVL
from osmosis.core.fact_daily_balances
where balance_type = 'locked liquidity' and currency ilike '%pool%'
and currency in (select currency from osmosis.core.fact_liquidity_provider_actions where currency ilike '%pool%')
group by 1,2)
select block_timestamp::date as date,
tvl,
count (distinct tx_id) as TX_Count,
count (distinct liquidity_provider_address) as Users_Count
--sum (amount*usdprice/pow(10,decimal)) as Volume,
--sum (volume) over (partition by wallet_type order by date) as Cumulative_Volume
from osmosis.core.fact_liquidity_provider_actions t1 join poolstvl t2 on t1.block_timestamp::date = t2.day and t1.currency = t2.pool
where tx_status = 'SUCCEEDED' and currency ilike '%pool%'
and pool_id = '674'
group by 1,2
order by 1
Run a query to Download Data