Abbas_ra21method 2 B
    Updated 2024-05-21
    0x8d606afb4fba81b501e81c803bd5274f15f6de07-- forked from method 2 A @ https://flipsidecrypto.xyz/edit/queries/1f66d220-90bc-4b76-8c31-c31c96631510

    with main AS (
    select
    DISTINCT Sender_wallet AS Addresses,
    from
    external.layerzero.fact_transactions_snapshot
    group by
    1
    )
    select
    SOURCE_ADDRESS,
    count(DISTINCT DESTINATION_ADDRESS) AS Count
    from
    crosschain.defi.ez_bridge_activity
    where
    SOURCE_ADDRESS != DESTINATION_ADDRESS
    and DESTINATION_ADDRESS in (
    select
    addresses
    from
    main
    ) and DESTINATION_ADDRESS like '0x%' and SOURCE_ADDRESS like '0x%'
    and SOURCE_ADDRESS not in (select DISTINCT contract_address from ethereum.core.ez_decoded_event_logs where BLOCK_TIMESTAMP::Date >= dateadd(day,-30,current_Date))
    and SOURCE_ADDRESS not in (select DISTINCT contract_address from arbitrum.core.ez_decoded_event_logs where BLOCK_TIMESTAMP::Date >= dateadd(day,-30,current_Date))
    and SOURCE_ADDRESS not in (select DISTINCT contract_address from base.core.ez_decoded_event_logs where BLOCK_TIMESTAMP::Date >= dateadd(day,-30,current_Date))
    and SOURCE_ADDRESS not in (select DISTINCT contract_address from optimism.core.ez_decoded_event_logs where BLOCK_TIMESTAMP::Date >= dateadd(day,-30,current_Date))
    and SOURCE_ADDRESS not in (select DISTINCT contract_address from bsc.core.ez_decoded_event_logs where BLOCK_TIMESTAMP::Date >= dateadd(day,-30,current_Date))
    and SOURCE_ADDRESS in (select DISTINCT ORIGIN_FROM_ADDRESS from ethereum.ens.fact_registrations)
    and SOURCE_ADDRESS in (select DISTINCT TRADER from crosschain.defi.ez_dex_swaps )
    group by
    1
    order by
    2 desc
    limit
    1000
    QueryRunArchived: QueryRun has been archived