adriaparcerisasSolana collections
Updated 2023-01-02
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
33
34
35
36
›
⌄
WITH
sales AS (
SELECT
block_timestamp,
block_id,
n.mint,
b.label,
succeeded,
n.sales_amount,n.seller,n.purchaser,
marketplace,
n.tx_id
FROM solana.core.fact_nft_sales n
LEFT OUTER JOIN solana.core.dim_labels b
ON n.mint = b.address
WHERE label IS NOT NULL),
final_data as (
SELECT
trunc(block_timestamp,'day') AS date,
label as collection,
count(distinct tx_id) AS transactions,
sum(transactions) over (partition by collection order by date) as cum_transactions,
sum(sales_amount) as volume_of_sales,
sum(volume_of_sales) over (partition by collection order by date) as cum_volume_sales,
avg(sales_amount) as avg_nft_price,
avg(avg_nft_price) over (partition by collection order by date) as cum_avg_price,
count(purchaser) as users,
sum(users) over (partition by collection order by date) as cum_users
from sales
group by 1,2
order by 1 asc
),
final_data_2 as (
SELECT
date,
collection,
cum_transactions as total_transactions,
Run a query to Download Data