maybeyonassushi_other_dex_scatterplot
    Updated 2022-11-28
    with prices as (
    select
    date(hour) as date,
    symbol,
    -- token_address,
    avg(price) as price
    -- case when symbol='UNI' and price<1 then null else price end as price
    from ethereum.token_prices_hourly
    where symbol in (
    'UNI','SUSHI','PSP','1INCH','CRV','BNT','BAL','ZRX','KNC','DYDX'
    )
    group by 1,2
    ),
    data as (
    select * from prices
    where price is not null
    and year(date) >= 2021
    order by date desc
    )

    select * from data
    pivot(avg(price) for symbol in ('UNI','SUSHI','PSP','1INCH','CRV','BNT','BAL','ZRX','KNC','DYDX') )
    as p


    Run a query to Download Data