sarathfootball_sorrare_7.5
    Updated 2022-11-23
    with buy AS (select sum(price_usd) as volume_buy, BUYER_ADDRESS as users
    from ethereum.core.ez_nft_sales
    where PROJECT_NAME = 'sorare'
    and BUYER_ADDRESS not like '0x0000000000000000000000000000000000000000'
    group by 2
    HAVING VOLUME_buy is not NULL
    order by 1 DESC),
    sals as (select sum(price_usd) as volume_sale,SELLER_ADDRESS as users
    from ethereum.core.ez_nft_sales
    where PROJECT_NAME = 'sorare'
    and seller_ADDRESS not like '0x0000000000000000000000000000000000000000'
    group by 2
    HAVING VOLUME_sale is not NULL
    order by 1 DESC)
    select volume_sale - volume_buy as profit_USD ,a.users
    from buy a inner join sals b on a.users = b.users
    order by 1 DESC
    limit 25
    Run a query to Download Data