yasmin-n-d-r-hossss pool2
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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with tvl as (
select
date_trunc('day', date) as date,
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 liquidity_provider_address
) as providers_count,
sum(
amount / pow(10, 18)
) as amount
from
osmosis.core.fact_liquidity_provider_actions x
join tvl y on x.block_timestamp :: date = y.date
and x.currency = y.pool
Run a query to Download Data