nitsAurory vs Others
Updated 2023-04-13Copy 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
a_l as
(SELECT mint as address,contract_name as label
from solana.core.dim_nft_metadata
where contract_name = 'Aurory' ) ,
others as
(SELECT date(block_timestamp) as day,sum(sales_amount) as total_amt,
count(DISTINCT tx_id) as total_txs,
sum(total_amt) over (order by day) as cum_sales,
avg(total_amt) over (order by day) as avg_sales,
sum(total_txs) over (order by day) as cum_txs,
avg(total_txs) over (order by day) as avg_txs,
cum_sales/cum_txs as sale_per_tx,
max(sales_amount) as max_price_sold,
min(sales_amount) as min_price_sold,
'others' as type
from solana.core.fact_nft_sales
where mint not in (SELECT address from a_l ) and succeeded = TRUE and day >= CURRENT_DATE -90
GROUP by 1 ),
aurory as (SELECT date(block_timestamp) as day,sum(sales_amount) as total_amt,
COUNT(DISTINCT tx_id) as total_txs,
sum(total_amt) over (order by day) as cum_sales,
avg(total_amt) over (order by day) as avg_sales ,
sum(total_txs) over (order by day) as cum_txs,
avg(total_txs) over (order by day) as avg_txs,
cum_sales/cum_txs as sale_per_tx,
max(sales_amount) as max_price_sold,
min(sales_amount) as min_price_sold,
'aurory' as type
from solana.core.fact_nft_sales
where mint in (SELECT address from a_l ) and succeeded = TRUE and day >= CURRENT_DATE -90
GROUP by 1 )
SELECT * from aurory
UNION ALL
SELECT * from others
Run a query to Download Data