i_dan2024-04-30 03:18 PM
    Updated 2024-05-03
    --select -from -where -group by -order by

    SELECT
    --block_timestamp::datetime,
    date_trunc(h, s.block_timestamp) time,
    --swaps.tx_hash,
    --swaps.event_name,
    --swaps.platform,
    --swaps.origin_to_address,
    s.symbol_in,
    SUM(s.amount_in_usd) total_amount,
    platform
    --labels.address_name,
    --labels.label
    FROM ethereum.defi.ez_dex_swaps s
    JOIN ethereum.core.dim_labels l
    ON s.contract_address = l.address
    WHERE
    platform LIKE 'uniswap-%'
    AND s.amount_in_usd IS NOT NULL
    AND time BETWEEN '2024-04-20' AND '2024-04-21'

    GROUP BY 1, 2, 4
    --HAVING total_amount IS NOT NULL

    ORDER BY total_amount DESC
    LIMIT
    10000
    QueryRunArchived: QueryRun has been archived