boomer77Copy of apollo
    Updated 2021-10-06
    with depo as (select sum(msg_value:execute_msg:send:amount/1e6) as amount, msg_value:contract::string as LP_pair
    from terra.msgs
    where msg_value:execute_msg:send:contract::string = 'terra1g7jjjkt5uvkjeyhp8ecdz4e4hvtn83sud3tmh2' and msg_value:execute_msg:send:amount/1e6 is not null and msg_value:contract::string is not null
    group by 2),

    label as (select address, address_name
    from terra.labels),

    final as (select a.amount, a.LP_pair, b.address_name, case
    when a.LP_pair = 'terra1rqkyau9hanxtn63mjrdfhpnkpddztv3qav0tq2' then 'Pylon MINE-UST LP'
    when a.LP_pair = 'terra1p60datmmf25wgssguv65ltds3z6ea3me74nm2e' then 'Terraswap mDOT-UST LP'
    when a.LP_pair = 'terra1ndlx5ndkknvmgj6s5ggmdlhjjsz0w6wrnwn5cf' then 'Terraswap mIAU-UST LP'
    when a.LP_pair = 'terra1uwhf02zuaw7grj6gjs7pxt5vuwm79y87ct5p70' then 'StarTerra STT-UST LP'
    when a.LP_pair = 'terra1m8mr9u3su46ezxwf7z7xnvm0jsapl2jd8vgefh' then 'Terraswap mAMD-UST LP'
    when a.LP_pair = 'terra1ekd58y58vq4gmxlzpc27dwuhw7wmms928ftuep' then 'Terraswap mVIXY-UST LP'
    when a.LP_pair = 'terra1veqh8yc55mhw0ttjr5h6g9a6r9nylmrc0nzhr7' then 'Terraswap mARKK-UST LP'
    when a.LP_pair = 'terra1mv3pgkzs4krcennqj442jscg6jv84cejrs50n2' then 'Terraswap mSQ-UST LP'
    else b.address_name end as Apollo_Vault
    from depo a
    left outer join label b on a.Lp_pair = b.address
    order by 1 desc)

    select * from final
    where apollo_vault is not null

    Run a query to Download Data