shadilTrend of Pools - changed tvl
    Updated 2022-05-14
    with added as (
    select
    date(block_timestamp) as date, to_address_name as name, SUM(ZEROIFNULL(amount_usd)) as tvl_by_usd, 'added' as type
    from flipside_prod_db.ethereum.udm_events
    where to_label = 'sushiswap'
    AND to_label_subtype = 'pool'
    AND origin_function_name IN ('addLiquidity', 'addLiquidityETH')
    and SYMBOL IS NOT NULL
    and to_address_name ilike '%-%'
    and date(block_timestamp) >= CURRENT_DATE - 90
    group by date, to_address_name
    order by tvl_by_usd DESC
    ),
    removed as (
    select
    date(block_timestamp) as date, from_address_name as name, SUM(ZEROIFNULL(amount_usd)) * -1 as tvl_by_usd, 'removed' as type
    from flipside_prod_db.ethereum.udm_events
    where to_label = 'sushiswap'
    AND from_label_subtype = 'pool'
    and from_address_name ilike '%-%'
    AND origin_function_name IN ('removeLiquidityETH', 'removeLiquidityETHSupportingFeeOnTransferTokens', 'removeLiquidityWithPermit',
    'removeLiquidityETHWithPermitSupportingFeeOnTransferTokens', 'removeLiquidity', 'removeLiquidityETHWithPermit')
    and SYMBOL IS NOT NULL
    and date(block_timestamp) >= CURRENT_DATE - 90
    group by date, from_address_name
    order by tvl_by_usd ASC
    )
    select * from added
    UNION
    select * from removed
    Run a query to Download Data