boomer77current lp whale
    Updated 2021-11-10
    with receive as (select to_address, sum(rune_amount) as received
    from thorchain.transfers
    group by 1),

    send as (select from_address, sum(rune_amount) as sent
    from thorchain.transfers
    where from_address in (select to_address from receive)
    group by 1),

    total as (select a.to_address, (a.received - b.sent) as total_rune
    from receive a
    left outer join send b on a.to_address = b.from_address),

    tenthousand as (select to_address, total_rune
    from total
    where total_rune > 10000),

    addlp as (select pool_name, (sum(rune_amount_usd) + sum(asset_amount_usd)) as lp_add_usd
    from thorchain.liquidity_actions
    where from_address in (select to_address from tenthousand) and lp_action = 'add_liquidity'
    group by 1),

    remlp as (select pool_name, (sum(rune_amount_usd) + sum(asset_amount_usd)) as lp_remove_usd
    from thorchain.liquidity_actions
    where from_address in (select to_address from tenthousand) and lp_action = 'remove_liquidity'
    group by 1),

    final as (select a.pool_name, (a.lp_add_usd - b.lp_remove_usd) as vol_current
    from addlp a
    left outer join remlp b on a.pool_name = b.pool_name)

    select *
    from final
    where vol_current > 0
    order by 2 desc
    Run a query to Download Data