Alir3zaUntitled Query
Updated 2022-08-31Copy Reference Fork
9
1
2
3
4
5
6
7
8
›
⌄
with seller_Base as ( select seller_address , tokenid as sell_Token,sum(price_usd) as Sell_Price from ethereum.core.ez_nft_sales
where project_name = 'cryptopunks' and event_type = 'sale' and price_usd >0
and tx_hash not in ('0x92488a00dfa0746c300c66a716e6cc11ba9c0f9d40d8c58e792cc7fcebf432d0') and BLOCK_TIMESTAMP >= '2022-01-01' group by seller_address,2 ),
buyer_Base as ( select buyer_address , tokenid as buy_Token,sum(price_usd) as Buy_Price from ethereum.core.ez_nft_sales
where project_name = 'cryptopunks' and event_type = 'sale' and price_usd >0
and tx_hash not in ('0x92488a00dfa0746c300c66a716e6cc11ba9c0f9d40d8c58e792cc7fcebf432d0') and BLOCK_TIMESTAMP >= '2022-01-01' group by buyer_address,2 )
select buyer_address as wallet, sum(Sell_Price - Buy_Price) as Profits from seller_Base join buyer_Base
on seller_address = buyer_address and sell_Token = buy_Token where Sell_Price is not null and Buy_Price is not null group by wallet order by Profits DESC limit 10
Run a query to Download Data