mlhpunk4
    Updated 2022-08-29
    with nft_seller as (select seller_address,
    sum(price_usd) as sell_USD_volume
    from ethereum.core.ez_nft_sales
    left outer join ethereum.core.dim_labels on nft_address = address
    where label like 'cryptopunks'
    and price_usd is not null
    group by 1
    ),
    nft_buyer as(select buyer_address,
    sum(price_usd) as buy_USD_volume
    from ethereum.core.ez_nft_sales
    left outer join ethereum.core.dim_labels on nft_address = address
    where label like 'cryptopunks'
    and price_usd is not null
    group by 1
    )

    select buyer_address,
    sum(sell_USD_volume - buy_USD_volume) as loss_USD_volume
    from nft_seller
    left outer join nft_buyer on seller_address = buyer_address
    where sell_USD_volume is not null
    and buy_USD_volume is not null
    group by 1
    order by 2 ASC
    limit 10
    Run a query to Download Data