MotilolaFilter w/ contract address
    Updated 2024-10-15
    WITH jared_swaps AS (
    SELECT
    a.block_timestamp,
    a.block_number,
    b.position,
    a.tx_hash,
    a.platform,
    a.origin_from_address,
    a.origin_to_address,
    a.contract_address,
    a.amount_in,
    a.amount_in_usd,
    a.amount_out,
    a.amount_out_usd,
    a.symbol_in,
    a.symbol_out,
    a.token_in,
    a.token_out,
    b.tx_fee AS total_tx_fee
    FROM
    ethereum.defi.ez_dex_swaps a
    JOIN ethereum.core.fact_transactions b ON a.block_number = b.block_number
    AND a.tx_hash = b.tx_hash
    WHERE
    a.origin_to_address = LOWER('0x1f2F10D1C40777AE1Da742455c65828FF36Df387')
    ),
    jared_block_interactions AS (
    SELECT
    block_number,
    origin_to_address,
    contract_address,
    COUNT(DISTINCT tx_hash) AS tx_count
    FROM
    jared_swaps
    WHERE
    origin_to_address = LOWER('0x1f2F10D1C40777AE1Da742455c65828FF36Df387')
    QueryRunArchived: QueryRun has been archived