boomer77thorchain liq action add lp types
Updated 2022-05-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
with raw as (select block_timestamp, pool_name, tx_id, rune_amount, asset_amount, rune_amount_usd, asset_amount_usd, case
when rune_amount = 0 then 'rune_only'
when asset_amount = 0 then 'asset_only'
else 'symmetric' end as typez
from thorchain.liquidity_actions
where lp_action = 'add_liquidity'),
symm as (select date_trunc('day', block_timestamp) as dt, typez, count(distinct tx_id) as tx_count, sum(rune_amount_usd+asset_amount_usd) as lp_vol_usd
from raw
group by 1,2)
select *
from symm
where year(dt) = '2022'
Run a query to Download Data