Abolfazl_771025top 10 project on solana chain in costing platform fee
Updated 2022-09-23
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
›
⌄
WITH sol_price as (
select
date(block_timestamp) as date,
avg(swap_to_amount) / avg(swap_from_amount) as solprice
from solana.fact_swaps
where swap_from_mint = 'So11111111111111111111111111111111111111112'
and swap_to_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
and swap_to_amount > 0
and swap_from_amount > 0
and block_timestamp >= '2022-01-01'
group by 1
order by 1 asc
), MAIN as (
select
DISTINCT mint as mint,
0.02*sum(SALES_AMOUNT * solprice) as FEES_IN_USD
from solana.core.fact_nft_sales a
join sol_price b
on date(a.block_timestamp) = b.date
where block_timestamp >= '2022-01-01'
and MARKETPLACE='opensea'
group by 1
)
select
CONTRACT_NAME,
sum(FEES_IN_USD) as volume
from main a join solana.core.dim_nft_metadata b on a.mint=b.mint
where FEES_IN_USD is not null
group by 1
order by 2 desc
limit 10
Run a query to Download Data