granadohoPercentage of Sales above 1 SOL and 10 SOL
Updated 2022-04-25
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
›
⌄
with total as (
select
count(distinct tx_id) as total_sales,
sum(case when sales_amount > 1 then 1 Else 0 End) as sales_above_1_sol,
sum(case when sales_amount > 10 then 1 Else 0 End) as sales_above_10_sol
from solana.fact_nft_sales
where succeeded = 'TRUE'
)
(
select
'Above 1 SOL' as metrics,
((total_sales - sales_above_1_sol)/total_sales)*100 as perc_sales_below_1_sol,
(sales_above_1_sol/total_sales) * 100 as perc_sales_above_1_sol,
NULL as perc_sales_below_10_sol,
NULL as perc_sales_above_10_sol
from total
)
UNION
(
select
'Above 10 SOL' as metrics,
NULL as sales_below_1_sol,
NULL as sales_above_1_sol,
((total_sales - sales_above_10_sol)/total_sales) * 100 as sales_below_10_sol,
(sales_above_10_sol/total_sales) * 100 as perc_sales_above_10_sol
from total
)
Run a query to Download Data