i_danWeek 2 Assignment - 2024-05-04 02:54 PM
    Updated 2024-05-04
    -- WEEK 2 ASSIGNMENT
    -- Using the ez_dex_swaps and the ethereum.core.dim_labels table in the Ethereum DeFi Database,
    -- Find the names of the top 10 contracts in uniswap by USD amount received.


    SELECT
    s.block_timestamp,
    s.tx_hash,
    s.event_name,
    s.contract_address,
    l.address_name,
    l.label,
    s.amount_in,
    s.symbol_in,
    s.amount_in_usd,
    s.origin_from_address

    FROM
    ethereum.defi.ez_dex_swaps s
    JOIN
    ethereum.core.dim_labels l
    ON s.contract_address = l.address

    WHERE
    platform LIKE 'uniswap-%'
    AND
    amount_in_usd IS NOT NULL

    ORDER BY
    amount_in_usd DESC

    LIMIT 10
    QueryRunArchived: QueryRun has been archived