jp121 [Optimism] Distinct Wallets (Optimism Bridge) - Users 60 days
    Updated 2022-06-17
    WITH tx as (
    select *, IFF(eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1', 'Deposit', 'Withdraw') as type
    from ethereum.core.ez_eth_transfers
    where eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1' OR eth_from_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
    )

    SELECT type, COUNT(DISTINCT ORIGIN_FROM_ADDRESS) as num_wallets, SUM(AMOUNT) as eth_amount
    FROM tx
    WHERE block_timestamp > CURRENT_DATE - 60
    GROUP BY 1
    Run a query to Download Data