kiacryptoUntitled Query
Updated 2022-10-09Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with base as (
select *
from solana.core.dim_labels join solana.core.fact_nft_sales on mint = address
where
block_timestamp::date >= '{{start_date}}' and block_timestamp::date <= '{{end_date}}' and
label_type = 'nft' and
address_name = '{{collection_name}}'
)
select
case when marketplace ilike '%magic eden%' then 'magic eden'
else marketplace end as marketplaces,
sum(sales_amount) as sales_volume,
avg(sales_amount) as avg_sales_price,
count(distinct tx_id) as sales_count,
count(distinct purchaser) as unique_buyer,
count(distinct seller) as unique_seller
from base
group by 1
Run a query to Download Data