SniperSo1
Updated 2022-10-30Copy Reference Fork
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 USD_Price as (
select
date_trunc('Day', block_timestamp) Date,
avg (swap_to_amount/swap_from_amount) as SOL_price
from solana.fact_swaps
where swap_from_mint = 'So11111111111111111111111111111111111111112'
and swap_to_mint in ('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDAv','Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
and swap_to_amount > 0
and swap_from_amount > 0
and succeeded = 'TRUE'
group by 1)
, hyper_Space as (
select
count (distinct tx_id) as Sales_Cnt,
count (distinct purchaser) as Buyers_Cnt,
count (distinct seller) as Sellers_Cnt,
count (distinct mint) as NFTS_Cnt,
sum (sales_amount) as SOL_Volume,
sum (sales_amount*SOL_price) as USD_Volume,
AVG (sales_amount) as AVG_SOL_Volume,
AVG (sales_amount*SOL_price) as AVG_USD_Volume,
Median (sales_amount) as Median_SOL_Volume,
Median (sales_amount*SOL_price) as Median_USD_Volume,
Min (sales_amount) as Min_SOL_Volume,
Min (sales_amount*SOL_price) as Min_USD_Volume,
Max (sales_amount) as Max_SOL_Volume,
Max (sales_amount*SOL_price) as Max_USD_Volume
from solana.core.fact_nft_sales A
join USD_Price B on date_trunc('Day', A.block_timestamp) = B.date
where marketplace = 'hyperspace'
and succeeded = 'TRUE'
)
, Coral_Cube as (
Run a query to Download Data