MLDZMNportal6
Updated 2022-12-23
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
29
30
31
32
›
⌄
with tb1 as (
select
Label,
ADDRESS as mints
from solana.core.dim_labels
where LABEL ilike '%portals%'),
tb3 as (select
recorded_hour::date as day,
avg (close) as price_token
from solana.core.fact_token_prices_hourly
where symbol = 'SOL'
group by 1)
select
MARKETPLACE,
count(TX_ID) as sale_no,
count(distinct PURCHASER) as buyer_no,
sum(SALES_AMOUNT) as volume,
sum(SALES_AMOUNT*price_token) as volume_usd,
avg(SALES_AMOUNT) as average_volume_SOL,
avg(SALES_AMOUNT*price_token) as average_volume,
sale_no/buyer_no as average_buyer,
buyer_no/count(distinct date_trunc(day, block_timestamp)) as average_buyer_day,
volume_usd/count(distinct date_trunc(day, block_timestamp)) as average_volume_day
from solana.core.fact_nft_sales x join tb3 y on x.BLOCK_TIMESTAMP::date=y.day
left join tb1 a on x.mint=a.mints
where SUCCEEDED='TRUE'
and mint in (select mints from tb1)
and SALES_AMOUNT>0
and label!='portals.art'
group by 1
Run a query to Download Data