binhachonFree Square - BUSD pool stats - #4
Updated 2022-06-14
999
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 add_liquidity_txs as (
select
tx_id,
block_timestamp,
lp_action,
stake_units,
rune_amount_usd + asset_amount_usd + coalesce(il_protection_usd, 0) as amount_usd,
coalesce(il_protection, 0) as il_protection,
coalesce(il_protection_usd, 0) as il_protection_usd
from flipside_prod_db.thorchain.liquidity_actions
where pool_name = 'BNB.BUSD-BD1'
and lp_action = 'add_liquidity'
),
remove_liquidity_txs as (
select
tx_id,
block_timestamp,
lp_action,
stake_units,
rune_amount_usd + asset_amount_usd + coalesce(il_protection_usd, 0) as amount_usd,
coalesce(il_protection, 0) as il_protection,
coalesce(il_protection_usd, 0) as il_protection_usd
from flipside_prod_db.thorchain.liquidity_actions
where pool_name = 'BNB.BUSD-BD1'
and lp_action = 'remove_liquidity'
),
txs as (
select
add_liquidity_txs.*
from add_liquidity_txs
inner join remove_liquidity_txs on (add_liquidity_txs.stake_units = remove_liquidity_txs.stake_units)
),
txs_1 as (
select
remove_liquidity_txs.*
from remove_liquidity_txs
Run a query to Download Data