mlhpunk4
Updated 2022-08-29Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
›
⌄
with nft_seller as (select seller_address,
sum(price_usd) as sell_USD_volume
from ethereum.core.ez_nft_sales
left outer join ethereum.core.dim_labels on nft_address = address
where label like 'cryptopunks'
and price_usd is not null
group by 1
),
nft_buyer as(select buyer_address,
sum(price_usd) as buy_USD_volume
from ethereum.core.ez_nft_sales
left outer join ethereum.core.dim_labels on nft_address = address
where label like 'cryptopunks'
and price_usd is not null
group by 1
)
select buyer_address,
sum(sell_USD_volume - buy_USD_volume) as loss_USD_volume
from nft_seller
left outer join nft_buyer on seller_address = buyer_address
where sell_USD_volume is not null
and buy_USD_volume is not null
group by 1
order by 2 ASC
limit 10
Run a query to Download Data