adriaparcerisasList of wallets participating in Layerzero and EtherFi
    Updated 2024-08-14
    WITH
    weeth as (
    SELECT
    date_trunc('day', block_timestamp) as day,
    to_address as address,
    SUM(amount_usd) as amount
    FROM
    ethereum.core.ez_token_transfers
    WHERE (contract_address = lower('0x35fA164735182de50811E8e2E824cFb9B6118ac2') or contract_address='0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee')
    GROUP BY 1, 2
    UNION ALL
    SELECT
    date_trunc('day', block_timestamp) as day,
    from_address as address,
    -SUM(amount_usd) as amount
    FROM
    ethereum.core.ez_token_transfers
    WHERE (contract_address = lower('0x35fA164735182de50811E8e2E824cFb9B6118ac2') or contract_address='0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee')
    GROUP BY 1, 2
    ),
    agg as (
    SELECT
    address as wallet_address,
    SUM(amount) as balance
    FROM
    weeth where address <> '0x0000000000000000000000000000000000000000' and day<'2024-03-18'
    GROUP BY 1
    ),
    ins as (
    select distinct nft_to_address, count(distinct tokenid) as nfts_in from ethereum.nft.ez_nft_transfers
    where nft_address=lower('0xb49e4420eA6e35F98060Cd133842DbeA9c27e479')
    and nft_to_address<>'0x0000000000000000000000000000000000000000'
    and block_timestamp<'2024-03-15'
    group by 1
    QueryRunArchived: QueryRun has been archived