with famoust as (
select * from solana.core.dim_labels
where label = 'famous fox federation'),
transdimensionalt as (
select * from solana.core.dim_labels
where label = 'transdimensional fox federation'),
selltable as (
select seller,
sum (sales_amount) as Total_Volume
from solana.core.fact_nft_sales
where mint in (select address from transdimensionalt)
and succeeded = 'TRUE'
group by 1),
buytable as (
select purchaser,
sum (sales_amount) as Total_Volume
from solana.core.fact_nft_sales
where mint in (select address from transdimensionalt)
and succeeded = 'TRUE'
group by 1)
select t1.seller,
sum (t1.Total_Volume - t2.Total_Volume) as Profit
from selltable t1 join buytable t2 on t1.seller = t2.purchaser
group by 1
order by 2 DESC
limit 10