cypherCryptoPunks Sales and Traders - profit
    Updated 2022-08-31
    with buys as (select
    block_timestamp,
    buyer_address as address,
    price,
    price_usd as buy_usd,
    tokenid as punk,
    tx_hash

    from ethereum.core.ez_nft_sales
    where nft_address = '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'
    and price > 0
    and price_usd > 0
    ),

    sells as (select
    block_timestamp,
    seller_address as address,
    price,
    price_usd as sell_usd,
    tokenid as punk,
    tx_hash

    from ethereum.core.ez_nft_sales
    where nft_address = '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'
    and price > 0
    and price_usd > 0
    ),

    sales as (select
    b.block_timestamp as buy_time,
    s.block_timestamp as sell_time,
    b.address as address,
    b.buy_usd as buy_price_usd,
    s.sell_usd as sell_price_usd,
    sell_price_usd - buy_price_usd as profit,
    b.punk as punk
    Run a query to Download Data