Updated 2022-06-08
    select mints.purchaser as wallet, sum(sales_amount) - sum(mint_price) as profit, marketplace
    from flipside_prod_db.solana.fact_nft_sales sales inner join flipside_prod_db.solana.fact_nft_mints mints on sales.purchaser = mints.purchaser
    where sales.succeeded = 'TRUE' and mints.block_timestamp::date >= '2022-01-01' and mint_currency = 'So11111111111111111111111111111111111111111'
    group by 1,3
    order BY 2 desc
    limit 10
    Run a query to Download Data