rmasDistinct Wallets - Last 60 Days
    Updated 2022-06-17
    WITH

    bridge_transactions AS (
    SELECT
    tx_hash
    , block_timestamp
    , eth_from_address AS wallet_address
    , 'deposit' AS transaction_type
    , amount AS amount_eth
    FROM ethereum.core.ez_eth_transfers
    WHERE eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
    UNION ALL
    SELECT
    tx_hash
    , block_timestamp
    , eth_to_address AS wallet_address
    , 'withdraw' AS transaction_type
    , amount AS amount_eth
    FROM ethereum.core.ez_eth_transfers
    WHERE eth_from_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
    )


    SELECT count(distinct wallet_address) AS distinct_wallets
    FROM bridge_transactions
    WHERE block_timestamp >= CURRENT_TIMESTAMP - interval '60 days'
    Run a query to Download Data