Pine Analyticsspiritual-bronze copy
    Updated 2025-01-26
    with tab1 as (
    SELECT
    DISTINCT tx_hash
    from
    ethereum.core.fact_transactions
    where
    to_address LIKE lower('0xEAaa41cB2a64B11FE761D41E747c032CdD60CaCE')
    )

    SELECT
    date_trunc('day', block_timestamp) as day,
    count(DISTINCT tx_hash) as swaps,
    count(DISTINCT origin_from_address) as users,
    sum(volume) as volume_usd


    FROM (
    select
    tx_hash,
    block_timestamp,
    origin_from_address,
    median(amount_usd) as volume

    FROM
    ethereum.core.ez_token_transfers
    WHERE
    tx_hash in (
    SELECT
    *
    from
    tab1
    )
    AND contract_address in (
    lower('0xdAC17F958D2ee523a2206206994597C13D831ec7'),
    lower('0xC9bCa88B04581699fAb5aa276CCafF7Df957cbbf'),
    lower('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2')
    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived