ramishoowUntitled Query
Updated 2022-12-18
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
›
⌄
select
date_trunc('day', block_timestamp) as date,
case
when address_name ilike '%Blockasset Legends%' then 'Blockasset Legends'
else address_name
end as collection_name,
sum(sales_amount) as sol_volume,
sum(sol_volume) over (Partition BY collection_name ORDER BY date) as cum_sol_volume,
avg(sales_amount) as avg_price,
avg(avg_price) over (ORDER BY date ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as ma7_sol_price,
count(distinct tx_id) as sales_count,
sum(sales_count) over (partition by collection_name order by date) as cum_sales_count,
count(distinct purchaser) as buyer_count
from solana.core.fact_nft_sales s
join solana.core.dim_labels l on s.mint = l.address
where (address_name ilike 'The Suites'
or address_name ilike 'Collectorz Club: The Collectorz'
or address_name ilike 'Laidback Lions'
or address_name ilike 'Hockey Heroes'
or address_name ilike 'Sports Rewind'
or address_name ilike 'Blockasset Legends%'
or address_name ilike '%stepn%'
)
and block_timestamp >= '2022-02-01'
group by 1,2
order by 2 asc
Run a query to Download Data