0xasmrUntitled Query
    Updated 2022-08-24
    WITH price_table AS(
    SELECT
    date_trunc(day, block_timestamp) AS day,
    AVG(token_price) AS price
    FROM ethereum.core.ez_token_transfers
    WHERE symbol = 'WETH'
    GROUP BY 1
    ORDER BY 1 DESC
    LIMIT 30
    )

    SELECT
    date_trunc(day, block_timestamp),
    tx_hash,
    b.price,
    amount_deposited AS weth_deposited
    FROM ethereum.maker.ez_deposits a
    LEFT JOIN price_table b
    ON a.block_timestamp = b.day
    WHERE a.token_deposited = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    ORDER BY 1 DESC
    LIMIT 100
    Run a query to Download Data