NakedCollectorDeGods
Updated 2023-01-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
27
28
29
30
31
32
33
34
35
36
›
⌄
with DeGods as (SELECT
--date_trunc(day, block_timestamp) as date
date_trunc('day',block_timestamp) as date,
count(tx_id) as sale_count,
count(distinct purchaser) as unique_buyer,
count(distinct SELLER) as unique_seller,
(unique_buyer-unique_seller) as buyer_min_seller,
sum(sales_amount) as volume,
--contract_name,
avg(sales_amount) as avg_price
--sum(sale_count) over (order by date) as cumu_count,
--sum(unique_buyer) over (order by date) as cumu_buyer,
--sum(volume) over (order by date) as cumu_volume,
--avg(avg_price) OVER (ORDER BY date ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as MA_7_Days,
--avg_price - lag(avg_price, 1, 0) over (ORDER BY date) as diff_to_prev
FROM solana.core.fact_nft_sales s
join solana.core.dim_nft_metadata m
on s.mint = m.mint
where contract_name = 'DeGods' and succeeded = TRUE
-- and block_timestamp::date < CURRENT_DATE and block_timestamp::date >= CURRENT_DATE - 90
and sales_amount > 0 and block_timestamp > '2023-01-01'
group by 1
),
y00ts as (SELECT
--date_trunc(day, block_timestamp) as date,
count(tx_id) as sale_count,
count(distinct purchaser) as unique_buyer,
sum(sales_amount) as volume,
--contract_name,
avg(sales_amount) as avg_price
Run a query to Download Data