RamaharBuyers Purchase Maximum price distribution
    Updated 2022-10-17

    -- Earliest date : 2021-12-18 ; Platform:quixotic
    with OP as (
    select DATE(hour) as dayz,
    avg(price) as OP_price
    from optimism.core.fact_hourly_token_prices
    where symbol = 'OP'
    group by 1),

    ETH as (
    select DATE(hour) as dayz,
    avg(price) as ETH_price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WETH'
    group by 1),

    OPETH as (
    select o.dayz,
    OP_price/ETH_price as OPETH_price
    from OP o
    join ETH e on o.dayz = e.dayz
    order by 1),
    details as (select
    case
    when currency_symbol = 'ETH' then price
    else price * OPETH_price
    end as price_ETH,
    nft_address,
    buyer_address,
    price_usd,
    tx_hash
    from optimism.core.ez_nft_sales s
    left join optimism.core.dim_labels ON nft_address = address
    left join OPETH o on s.block_timestamp::date = o.dayz
    where event_type = 'sale' ),
    Run a query to Download Data