sarathl_p stats9.5
    Updated 2022-08-24
    with tab1 as (
    select
    liquidity_provider as lper1,
    sum(amount0_usd) as Liquidity_Removed

    from flipside_prod_db.uniswapv3.lp_actions
    where amount0_usd < 1e9
    and action like 'DECREASE_LIQUIDITY'
    group by 1
    )

    , tab2 as (
    select
    liquidity_provider as lper2,
    sum(amount0_usd) as Liquidity_Provided

    from flipside_prod_db.uniswapv3.lp_actions
    where amount0_usd < 1e9
    and action like 'INCREASE_LIQUIDITY'
    group by 1
    )

    select
    lper1,
    (Liquidity_Provided - Liquidity_Removed) as Net_Liquidity_Provided
    from tab1 left outer join tab2 on lper1 = lper2
    where Liquidity_Provided is not null
    and Liquidity_Removed is not null
    order by 2 DESC
    limit 25
    Run a query to Download Data