MLDZMNft11
Updated 2022-10-27Copy 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
28
›
⌄
with buy as (
select
buyer as buyers,
sum(PRICE) as volume_usd_buy
from flow.core.fact_nft_sales s left join flow.core.dim_contract_labels b on s.NFT_COLLECTION=b.EVENT_CONTRACT
where TX_SUCCEEDED='TRUE' and CURRENCY='A.ead892083b3e2c6c.DapperUtilityCoin'
and BLOCK_TIMESTAMP>=CURRENT_DATE- {{Time_period}}
and CONTRACT_NAME = ('{{NFT_collection}}')
group by 1
),
sel as (select
seller as sellers,
sum(PRICE) as volume_usd_sell
from flow.core.fact_nft_sales s left join flow.core.dim_contract_labels b on s.NFT_COLLECTION=b.EVENT_CONTRACT
where TX_SUCCEEDED='TRUE' and CURRENCY='A.ead892083b3e2c6c.DapperUtilityCoin'
and BLOCK_TIMESTAMP>=CURRENT_DATE- {{Time_period}}
and CONTRACT_NAME = ('{{NFT_collection}}')
group by 1
)
select
buyers as nft_trader,
sum (volume_usd_sell - volume_usd_buy) as profit_usd
from buy join sel on buy.buyers = sel.sellers
group by 1
order by 2 DESC
limit 10
Run a query to Download Data