kiacryptoliquidity added on each pool
Updated 2022-05-30Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
select case when charindex('-', pool_name) > 0 then left(pool_name, charindex('-', pool_name)-1)
else pool_name end as pool_names, sum(rune_amount_usd) as amount, count(*) as "count", 'Rune only' as type
from flipside_prod_db.thorchain.liquidity_actions
where lp_action = 'add_liquidity' and asset_amount = 0
group by 1
union all
select case when charindex('-', pool_name) > 0 then left(pool_name, charindex('-', pool_name)-1)
else pool_name end as pool_names, sum(asset_amount_usd) as amount, count(*) as "count", 'Asset only' as type
from flipside_prod_db.thorchain.liquidity_actions
where lp_action = 'add_liquidity' and rune_amount = 0
group by 1
union all
select case when charindex('-', pool_name) > 0 then left(pool_name, charindex('-', pool_name)-1)
else pool_name end as pool_names, sum(rune_amount_usd + asset_amount_usd) as amount, count(*) as "count", 'Symmetric (both Rune + asset)' as type
from flipside_prod_db.thorchain.liquidity_actions
where lp_action = 'add_liquidity' and asset_amount != 0 and rune_amount != 0
group by 1
Run a query to Download Data