MLDZMNOC13
    Updated 2022-10-08
    with buy as (
    select
    buyer_address as buyer,
    sum(PRICE_usd) as volume_usd_buy
    from ethereum.core.ez_nft_sales
    where PLATFORM_NAME='rarible'
    group by 1 having volume_usd_buy is not null
    ),
    sel as (select
    seller_address as seller,
    sum(PRICE_usd) as volume_usd_sell
    from ethereum.core.ez_nft_sales
    where PLATFORM_NAME='rarible'
    group by 1 having volume_usd_sell is not null
    )
    select
    buyer as nft_trader,
    sum (volume_usd_sell - volume_usd_buy) as profit_usd
    from buy join sel on buy.buyer = sel.seller
    group by 1
    order by 2 DESC
    limit 10
    Run a query to Download Data