sarathl_p stats2
    Updated 2022-08-22
    with table1 as (select origin_from_address as newuser,min(block_timestamp) as mindate from optimism.velodrome.ez_lp_actions group by 1)

    select block_timestamp::date as date,
    t1.lp_action,
    count (distinct tx_hash) as TX_Count,
    count (distinct origin_from_address) as Users_Count,
    count (distinct newuser) as New_Users,
    sum (token0_amount_usd) as Volume,
    sum (volume) over (partition by t1.lp_action order by date)
    from optimism.velodrome.ez_lp_actions t1 join table1 t2 on t1.block_timestamp::date = t2.mindate::date
    group by 1,2
    order by 1

    Run a query to Download Data