kimmayyer-5963thor9
Updated 2022-08-08
9
1
2
3
4
›
⌄
select t1.pool_name, sum(t2.asset_amount_usd) as Total_Revenue_From_Affiliate_Fee, avg(t2.asset_amount_usd) as Average_Affiliate_Fee_Per_transactions, avg(t2.asset_amount_usd/t1.asset_amount_usd)*100 as Average_Affiliate_Fee_Ratio
from flipside_prod_db.thorchain.liquidity_actions t1 join flipside_prod_db.thorchain.liquidity_actions t2 on t1.tx_id = t2.tx_id and t1.asset_amount_usd > t2.asset_amount_usd
where t2.from_address ='thor1a427q3v96psuj4fnughdw8glt5r7j38lj7rkp8' and t1.asset_tx_id is not NULL and t2.tx_id not in (select tx_id from flipside_prod_db.thorchain.refund_events)
group by 1
Run a query to Download Data