SalehLP-er Retention-percent
    Updated 2022-04-30
    with lst_first as (
    select
    from_address as wallet_address
    from thorchain.liquidity_actions lc
    where
    BLOCK_TIMESTAMP::date>=
    ---------------------inner filter
    (select min(BLOCK_TIMESTAMP::date)
    from thorchain.liquidity_actions where LP_ACTION='add_liquidity' )
    ---------------------inner filter
    and BLOCK_TIMESTAMP::date<= (select min(BLOCK_TIMESTAMP::date)
    from thorchain.liquidity_actions where LP_ACTION='add_liquidity' )+30
    and LP_ACTION='add_liquidity'
    group by 1
    order by 1

    )
    , lst_first_count as (
    select
    count(from_address) as wallet_count
    from thorchain.liquidity_actions lc
    where
    BLOCK_TIMESTAMP::date>=
    ---------------------inner filter
    (select min(BLOCK_TIMESTAMP::date)
    from thorchain.liquidity_actions where LP_ACTION='add_liquidity' )
    ---------------------inner filter
    and BLOCK_TIMESTAMP::date<= (select min(BLOCK_TIMESTAMP::date)
    from thorchain.liquidity_actions where LP_ACTION='add_liquidity' )+30
    and LP_ACTION='add_liquidity'
    -- group by 1
    -- order by 1

    )
    Run a query to Download Data