boomer77claimer swap
    Updated 2021-12-02
    with claim as (select event_inputs:to::string as claimer, sum(event_inputs:value/1e18) as THOR_claimed
    from ethereum.events_emitted
    where event_inputs:from::string = '0x8526cec1d97a68c0e69420488d04dec5f101b46e' and tx_succeeded = 'TRUE'
    group by 1),

    lp as (select from_address, asset_address, sum(asset_amount) as THOR_LP, sum(rune_amount) as RUNE_LP
    from thorchain.liquidity_actions
    where pool_name = 'ETH.THOR-0XA5F2211B9B8170F694421F2046281775E8468044'
    and lp_action = 'add_liquidity'
    and asset_amount is not null
    and asset_address in (select claimer from claim)
    group by 1,2),

    buy_more as (select from_address, sum(from_amount), to_asset, sum(to_amount) as thor_bought
    from thorchain.swaps
    where from_asset = 'ETH.THOR-0XA5F2211B9B8170F694421F2046281775E8468044' and from_address in (select from_address from lp)
    group by 1,3),

    final as (select a.claimer, b.from_address, a.thor_claimed, b.thor_lp, b.rune_lp, c.thor_bought, case
    when b.thor_lp = a.thor_claimed then 'Provide_All_to_LP'
    when b.thor_lp > a.thor_claimed then 'Provide_more_than_claimed'
    when b.thor_lp < a.thor_claimed then 'Provide_some_lp'
    when b.thor_lp is null then 'Hold_Thor' end as LP_provide
    from claim a
    left outer join lp b on a.claimer = b.asset_address
    left outer join buy_more c on b.from_address = c.from_address)

    select lp_provide, count(distinct claimer) as counts
    from final
    group by 1
    Run a query to Download Data