sinahosseinzadehUntitled Query
    Updated 2022-08-16
    with mint_pool as (
    select top 10 pool_name,count(tx_hash) as tx_count, sum(LP_TOKEN_AMOUNT_USD) as total_lp_usd
    from optimism.velodrome.ez_lp_actions
    where lp_token_action = 'burn'
    group by 1
    order by 2 desc
    ),

    mint_pool2 as (
    select date_trunc('day',block_timestamp) as date , a.pool_name , count(tx_hash) as tx_count,sum(LP_TOKEN_AMOUNT_USD) as total_lp_usd
    from optimism.velodrome.ez_lp_actions a
    join mint_pool p
    on p.pool_name = a.pool_name
    where lp_token_action = 'burn'
    group by 1,2
    order by 1 asc
    ),
    burn_pool as (
    select top 10 pool_name,count(tx_hash) as tx_count, sum(LP_TOKEN_AMOUNT_USD) as total_lp_usd
    from optimism.velodrome.ez_lp_actions
    where lp_token_action = 'mint'
    group by 1
    order by 2 desc
    ),

    burn_pool2 as (
    select date_trunc('day',block_timestamp) as date , a.pool_name , count(tx_hash) as tx_count,sum(LP_TOKEN_AMOUNT_USD) as total_lp_usd
    from optimism.velodrome.ez_lp_actions a
    join mint_pool p
    on p.pool_name = a.pool_name
    where lp_token_action = 'mint'
    group by 1,2
    order by 1 asc
    )


    Run a query to Download Data