nasdfajsklj2024-05-31 10:13 AM
    Updated 2024-05-31
    with pacholders as (
    select lower(address) as address from (
    values
    ('0x1381af4ead4b30b6660403fd88868e57df8c4177') ,('0x68663fb06b6e718e7026aa1c2ddbc4e97ccd6c5c') ,('0xf21386124214029da3ae1d81f48ac7fcb7831443') ,('0x707a8bc6193e0aab5f184ae729b1a944285a4c79') ,('0x4be0e7517b380654face7cfbdc9b1e6a9360cc37') ,('0x9682e7c330fd4100cc3d56610bfac904fdf7f8e4') ,('0x7e8ad48336b02e1037702bbac6e541ddf0d9e56e') ,('0x3a5775510c1889eebac7722c1fa7d3c7a5844718') ,('0x66362b929c1a9aaf14c51aab9b455ad7fb8268c4') ,('0x2487e611ff876c101dd2b31758102953f4760af5') ,('0x90060e07216221d1b75cf36ef99e3a274913cc26') ,('0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459') ,('0x51d785f7121c5faa1ad3eb857cfefdc801a8d3c6') ,('0x24ecb62215db2c7ac528153c1bd947501f3d7ea7') ,('0x867438755b38b42b40928c72b4b92dea7b5dd007') ,('0xdc7fd67c78e2a2aefb55e60b0dea20fa08f7a749') ,('0xb707357cd23682120459e0bdb385401185de5e3b') ,('0x0ddd9dd9b77d3ba97b2496e3590787def887a95b') ,('0x8bd9c4b5ea8f6f14c9b14d830ddb67f3720d77f6') ,('0x55ec5ecfc6e98c3ad5a4c3bc8163ccf781610304') ,('0x5cc8f8358d4124649cdf0a97b0de44400a84504d') ,('0x3c66bb9c32954c189d473e80448b54fa3d092554') ,('0x9ea4b446fb2c369bf6fde5067f88a2c4e817a6db') ,('0xbaa9b933e5f977a85ab73542a8550e3998928d2c') ,('0xe2808fa3cf07fcb9305142e153a1ec0e653291f2') ,('0xf4fb9fa23edb32215e5284cf7dbfdb5607d51a5b') ,('0x8f8b4759dc93ca55bd6997df719f20f581f10f5c') ,('0x4c6a766e27726f084c41e2ba98d6df8e78f8e6e1') ,('0x5423ed3bc1eafd37a84d4f445eae2662ec8ee475') ,('0xc1cfa03bbd30d3048e580edee774b514d82b0750') ,('0x436608d74e5789f251b259e1f802999ee9d40929') ,('0x1aeeaa375b4112f537fafdea5aa3bab0e1257557') ,('0xb943f3a0d7debd96fc9214ab7643141a1c169285') ,('0x1d2c4cd9bee9dfe088430b95d274e765151c32db') ,('0xcfbb55fcb05534e21f3a87a095c2dbd3df6bfcd7') ,('0x0ed5fd85f1302fedd08a70d625b241dda41f3309') ,('0xfbd62a52beb6c45e78200dc3fae0c476a25c76dd') ,('0x389470f7bd7fa7dcde686223b21fa8eeb8a0c47a') ,('0xaa7577a7a27aa7fcf6d0ec481b87df3ad0f6a88e') ,('0x0002d0989cb7c2190384ca1211735f4204aa004b') ,('0x886478d3cf9581b624cb35b5446693fc8a58b787') ,('0x6fb33b9061f6079d320dcaf369b696874cfd496f') ,('0x070c0b19be15a76a859569f530e064cb28adef8c') ,('0x16e3f2e2bf51b3c19caf9b04299752a10ddc5ff5') ,('0xd51ce9be4a1cb6185b76ba825c59236a6cf5ca2a') ,('0x31304ccdd28e62ef552824db08a350d752068c39') ,('

    ) as t(address)
    )
    ,data as (
    select
    block_timestamp::date as date
    ,date_trunc('week', block_timestamp)::date as week
    ,'ETH' as chain
    , amount_usd
    , origin_to_address
    from ethereum.core.ez_token_transfers
    where 1=1
    and to_address = '0xc8c0e780960f954c3426a32b6ab453248d632b59'
    and block_timestamp::date > '2024-04-05'
    and origin_from_address != '0xc8c0e780960f954c3426a32b6ab453248d632b59' -- excludes our swaps, when we conver tokens to weth/usdc
    and origin_from_address in (select address from pacholders)


    UNION ALL
    select
    block_timestamp::date as date
    ,date_trunc('week', block_timestamp)::date as week
    ,'BASE' as chain
    , amount_usd
    , origin_to_address
    from base.core.ez_token_transfers
    where 1=1
    and to_address = '0xc8c0e780960f954c3426a32b6ab453248d632b59'
    and block_timestamp::date > '2024-04-05'
    and origin_from_address != '0xc8c0e780960f954c3426a32b6ab453248d632b59' -- excludes our swaps, when we conver tokens to weth/usdc
    and origin_from_address in (select address from pacholders)

    QueryRunArchived: QueryRun has been archived