0-MID Exploit $Amount By EXP.NO2
    Updated 2023-02-28
    with act1 as (
    with tab1 as (
    select LIQUIDITY_PROVIDER_ADDRESS,AMOUNT/1e6 as first_amount
    from osmosis.core.fact_liquidity_provider_actions
    where POOL_ID[0]='678'
    and LIQUIDITY_PROVIDER_ADDRESS in
    ('osmo1v44mqmhvtn8cw373xv0hw6npddccnr70lqsk9s')
    and BLOCK_ID='4712961'
    and CURRENCY='uosmo'
    and ACTION in ('pool_joined')),
    tab2 as (
    select LIQUIDITY_PROVIDER_ADDRESS,AMOUNT/1e6 as last_amount
    from osmosis.core.fact_liquidity_provider_actions
    where POOL_ID[0]='678'
    and LIQUIDITY_PROVIDER_ADDRESS in
    ('osmo1v44mqmhvtn8cw373xv0hw6npddccnr70lqsk9s')
    and BLOCK_ID='4713052'
    and CURRENCY='uosmo'
    and ACTION in ('pool_exited'))
    select tab2.LIQUIDITY_PROVIDER_ADDRESS
    ,last_amount-first_amount as net_exploited
    from tab1
    left join tab2
    on tab1.LIQUIDITY_PROVIDER_ADDRESS=tab2.LIQUIDITY_PROVIDER_ADDRESS),
    act2 as (
    select RECORDED_HOUR::date as date
    ,avg(PRICE) as usd_price
    from osmosis.core.ez_prices
    where date='2022-06-08'
    and SYMBOL='OSMO'
    group by 1)
    select LIQUIDITY_PROVIDER_ADDRESS
    ,net_exploited*usd_price as net_usd
    from act1
    full outer join act2
    on act1.net_exploited<>act2.usd_price
    Run a query to Download Data