0xaimanpool name asym vs sym
Updated 2022-05-27
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 asym as (with ronly as (select date(t) as d, POOL_NAME ,count(from_address) as n_address1
from(select block_timestamp as t, pool_name, from_address
from thorchain.liquidity_actions
where lp_action='add_liquidity' and asset_amount=0)
group by 1,2 order by 1),
aonly as (select date(t) as d, POOL_NAME, count(asset_address) as n_address2
from(select block_timestamp as t, pool_name, asset_address
from thorchain.liquidity_actions
where lp_action='add_liquidity' and rune_amount=0)
group by 1,2 order by 1)
select aonly.d, aonly.POOL_NAME, n_address1 as address_rune_only, n_address2 as address_asset_only
from ronly
inner join aonly on ronly.d=aonly.d and ronly.POOL_NAME=aonly.POOL_NAME),
sym as (select date(t) as d ,POOL_NAME, count(from_address) as n_address1
from(select block_timestamp as t, pool_name, from_address
from thorchain.liquidity_actions
where lp_action='add_liquidity' and asset_amount>0 and rune_amount>0)
group by 1,2 order by 1)
select date_trunc('week',asym.d),case when sym.POOL_NAME like 'BTC.%' then 'BTC-assets'
when sym.POOL_NAME like 'ETH.%' then 'ETH-assets'
when sym.POOL_NAME like 'BNB.%' then 'BNB-assets'
when sym.POOL_NAME like 'LTC.%' then 'LTC-assets'
when sym.POOL_NAME like 'BCH.%' then 'BCH-assets'
when sym.POOL_NAME like 'DOGE.%' then 'DOGE-assets'
when sym.POOL_NAME like 'TERRA.%' then 'TERRA-assets'
Run a query to Download Data