dan-smith2023-02-22 05:06 PM
    Updated 2023-02-22
    SELECT DISTINCT
    symbol
    FROM ethereum.core.ez_token_transfers t
    WHERE
    contract_address IN ('0xd533a949740bb3306d119cc777fa900ba034cd52'
    ,'0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b'
    ,'0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0'
    ,'0x6c3f90f043a72fa612cbac8115ee7e52bde6e490')


    SELECT
    date_trunc('month',HOUR) AS dt
    ,AVG(CASE WHEN SYMBOL = 'CRV' THEN PRICE
    END) AS crv_price
    ,AVG(CASE WHEN SYMBOL = 'CVX' THEN PRICE
    END) AS cvx_price
    ,AVG(CASE WHEN SYMBOL = 'FXS' THEN PRICE
    END) AS fxs_price
    ,AVG(CASE WHEN SYMBOL = '3Crv' THEN COALESCE
    END) AS tcrv_price
    FROM ethereum.core.fact_hourly_token_prices
    WHERE token_address IN ('0xd533a949740bb3306d119cc777fa900ba034cd52'
    ,'0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b'
    ,'0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0'
    ,'0x6c3f90f043a72fa612cbac8115ee7e52bde6e490')
    AND hour >= '2021-06-01'
    GROUP BY 1
    Run a query to Download Data