elsinaOP trade info vs Price
    Updated 2022-10-05


    with sell_velodrome as (
    select BLOCK_TIMESTAMP::date as "Day",sum(AMOUNT_IN) as "Amount"
    from optimism.velodrome.ez_swaps
    where SYMBOL_IN = 'OP' and "Day" >= '2022-05-29'
    group by "Day"
    ),buy_velodrome as (
    select BLOCK_TIMESTAMP::date as "Day",sum(AMOUNT_IN) as "Amount"
    from optimism.velodrome.ez_swaps
    where SYMBOL_out = 'OP' and "Day" >= '2022-05-29'
    group by "Day"
    ),sell_sushi as (
    select BLOCK_TIMESTAMP::date as "Day",sum(AMOUNT_IN) as "Amount"
    from optimism.sushi.ez_swaps
    where SYMBOL_IN = 'OP' and "Day" >= '2022-05-29'
    group by "Day"
    ),buy_sushi as (
    select BLOCK_TIMESTAMP::date as "Day",sum(AMOUNT_IN) as "Amount"
    from optimism.sushi.ez_swaps
    where SYMBOL_out = 'OP' and "Day" >= '2022-05-29'
    group by "Day"
    ) , op_price as (
    select HOUR::date as "Day",avg(PRICE) as "Daily Price" from optimism.core.fact_hourly_token_prices where SYMBOL = 'OP' group by "Day"
    )
    select
    sv."Day" as "Day",
    sv."Amount" as "Sell V",
    bv."Amount" as "Buy V",
    ss."Amount" as "Sell S",
    bs."Amount" as "Buy S",
    "Buy V"+"Sell V" as "Velodrome Volume",
    "Buy S"+"Sell S" as "Sushi Volume",
    "Buy V"+"Buy S" as "Total Buy",
    "Sell V"+"Sell S" as "Total Sell",
    "Total Buy"+"Total Sell" as "Daily Volume",
    Run a query to Download Data