0xaimanUser Withdrawal Percentage
    Updated 2021-11-07
    with a as (select pool_name, count(distinct from_address) as n_add
    from thorchain.liquidity_actions
    where lp_action='add_liquidity'
    group by 1),

    b as (select pool_name, count(distinct from_address) as n_remove
    from thorchain.liquidity_actions
    where lp_action='remove_liquidity'
    group by 1)
    select a.pool_name,((n_add-n_remove)/(n_add))*100 as percent_user_withdrawn
    from A
    inner join b on a.pool_name=b.pool_name

    Run a query to Download Data