Moetop 10 Buyer Stats
Updated 2023-01-05Copy Reference Fork
999
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
29
30
31
32
33
34
35
36
›
⌄
with Ethereum as (select
buyer_address as buyer,
sum(price_usd) as volume_usd,
avg(price_usd) as avg_volume_usd,
'Ethereum' as Network,
count(DISTINCT TOKENID) as num_nfts,
count(distinct tx_hash) as num_sales,
volume_usd/num_nfts as usd_per_nft,
volume_usd/{{days_back}} as usd_per_day,
num_sales/num_nfts as sales_per_nft
from ethereum.core.ez_nft_sales
where event_type = 'sale'
and price_usd > 0
and BLOCK_TIMESTAMP >= CURRENT_DATE - {{days_back}}
group by 1
order by 2 desc limit 10
),
Solana as (select
purchaser as buyer,
sum(sales_amount)*avg(price) as volume_usd,
avg(sales_amount)*avg(price) as avg_volume_usd,
count(DISTINCT a.mint) as num_nfts,
count(distinct tx_id) as num_sales,
volume_usd/num_nfts as usd_per_nft,
volume_usd/{{days_back}} as usd_per_day,
num_sales/num_nfts as sales_per_nft
from solana.core.fact_nft_sales a
join ethereum.core.fact_hourly_token_prices b on a.block_timestamp::date = b.hour::date
join solana.core.dim_nft_metadata l on a.mint = l.mint
where succeeded = 'TRUE'
and sales_amount > 0
and token_address ilike '0xD31a59c85aE9D8edEFeC411D448f90841571b89c'
and BLOCK_TIMESTAMP >= CURRENT_DATE - {{days_back}}
Run a query to Download Data