0xaimanUntitled Query
    Updated 2022-08-01
    with addliquid as (
    select
    TO_ADDRESS_NAME as pool_name,
    sum(amount_usd) as addliquidity_amount
    from polygon.udm_events
    where ORIGIN_FUNCTION_NAME ilike '%addLiquidity%'
    and amount_usd is not NULL
    and to_label='quickswap'
    and TO_ADDRESS_NAME !='quickswap router'
    GROUP by 1
    ),
    removeliq as (
    select
    TO_ADDRESS_NAME as pool_name,
    sum(amount_usd) as removeliquidity_amount
    from polygon.udm_events
    where ORIGIN_FUNCTION_NAME ilike '%removeLiquidity%'
    and amount_usd is not NULL
    and to_label='quickswap'
    and TO_ADDRESS_NAME !='quickswap router'
    GROUP by 1
    )
    select
    a.pool_name as pool_name,
    round( a.addliquidity_amount,0) as Totla_Value_Locked
    from addliquid a
    left join removeliq b
    on a.pool_name = b.pool_name
    order by 2 DESC
    limit 10
    Run a query to Download Data