twistedpairsCryptopunk Sales and Traders usd
    Updated 2022-08-29

    with received
    as (select SELLER_ADDRESS,TOKENID,PRICE as in_,PRICE_USD as s
    from ethereum.core.ez_nft_sales
    where ORIGIN_FUNCTION_SIGNATURE ='0x8264fe98' and PROJECT_NAME = 'cryptopunks' ),
    sent
    as (select BUYER_ADDRESS,TOKENID,PRICE as out_,PRICE_USD as b
    from ethereum.core.ez_nft_sales
    where ORIGIN_FUNCTION_SIGNATURE ='0x8264fe98' and PROJECT_NAME = 'cryptopunks' ),
    income__ as (
    select SELLER_ADDRESS ,(in_-out_) as income,(s-b) as usd_income
    from received
    join sent on received.TOKENID= sent.TOKENID and received.SELLER_ADDRESS= sent.BUYER_ADDRESS
    where s is not null and b is not null)
    select sum (income) as ETH_income,sum ( usd_income) as dollar_income,SELLER_ADDRESS as wallet
    from income__
    group by 3
    order by 2 desc
    limit 10
    Run a query to Download Data