cypherUntitled Query
    Updated 2022-11-26
    -- select
    -- date_trunc('hour', block_timestamp) as HOUR,
    -- avg(amount_in_usd/amount_in) as price_USD
    -- from avalanche.sushi.ez_swaps
    -- where TOKEN_IN = '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7' AND hour>= CURRENT_DATE - 30
    -- group by 1


    select
    date_trunc('hour', block_timestamp) as HOUR,
    avg(iff(symbol_in = 'WAVAX', amount_in_usd/amount_in, amount_out_usd/amount_out)) as avax_price
    from avalanche.sushi.ez_swaps
    where (token_in = '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7' or token_out = '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7')
    AND hour>= CURRENT_DATE - 30
    group by 1
    Run a query to Download Data