mlhUntitled Query
Updated 2022-11-07Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
›
⌄
SELECT date_trunc('month', block_timestamp) as month, --credit to jacktheguy
CASE WHEN marketplace in ('yawww', 'solanart', 'hadeswap', 'solport', 'coral cube') THEN 'not royalty Marketplace'
WHEN marketplace in ('opensea', 'magic eden v1', 'solana monkey business marketplace', 'magic eden v1') THEN 'Royalty Marketplace'
END marketplace_type,
sum(sales_amount) as sales_volume,
median(sales_amount) as median_price,
count(DISTINCT tx_id) as sales
FROM solana.core.fact_nft_sales
GROUP BY 1,2
having NOT marketplace_type is NULL
Run a query to Download Data