mhmdntewithdraws
    Updated 2022-10-14
    SELECT
    pool_name,
    COUNT(tx_hash) AS cnt_tx,
    SUM(
    CASE WHEN token0_amount_usd IS NOT NULL THEN token0_amount_usd
    ELSE token1_amount_usd
    END
    ) AS amount_usd
    FROM optimism.velodrome.ez_lp_actions
    WHERE block_timestamp >= CURRENT_DATE - 6
    AND lp_action = 'withdraw'
    GROUP BY pool_name
    Run a query to Download Data