SniperDAILY DEPOSIT AND WITHDRAW
    Updated 2022-11-16
    with LP as ( select
    Date(block_timestamp::date) date,
    tx_hash,
    LP_TOKEN_AMOUNT_USD as amt,
    lp_action
    from optimism.velodrome.ez_lp_actions
    where lp_action in ('deposit', 'withdraw'))

    select lp_action as action,
    date,
    count(DISTINCT tx_hash) as total_tx,
    sum(amt) as total_amt,
    sum(total_tx) over (order by date asc) as cum_tx,
    sum(total_amt) over (order by date asc) as cum_amt
    from LP
    where lp_action = 'deposit'
    group by 1,2
    UNION
    select 'withdraw' as status,
    date,
    count(DISTINCT tx_hash) as total_tx,
    sum(amt) as total_amt,
    sum(total_tx) over (order by date asc) as cum_tx,
    sum(total_amt) over (order by date asc) as cum_amt
    from LP
    where lp_action = 'withdraw'
    group by 1 ,2
    Run a query to Download Data