kiacryptoThe sales volume of each marketplace
Updated 2022-06-03Copy 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
›
⌄
with price as(
select date_trunc('day', block_timestamp) as date1, avg(swap_to_amount / swap_from_amount) as sol_price
from flipside_prod_db.solana.fact_swaps
where date1 >= '2022-05-09' and swap_from_amount > 0 and swap_to_amount > 0 and swap_program = 'jupiter aggregator v2' and swap_from_mint = 'So11111111111111111111111111111111111111112' and
swap_to_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' and (swap_to_amount / swap_from_amount) > 30 and (swap_to_amount / swap_from_amount) < 100
group by 1
)
select date_trunc('day', block_timestamp) as date, sum(price) as sales_volume, 'NBA Top Shot' as marketplace
from flow.core.fact_nft_sales
where block_timestamp::date >= '2022-05-09' and marketplace in ('A.c1e4f4f4c4257510.TopShotMarketV3', 'A.c1e4f4f4c4257510.Market') and tx_succeeded = true
group by 1
union all
select date_trunc('day', block_timestamp) as date, sum(sales_amount * sol_price) as sales_volume, 'Magic Eden' as marketplace
from flipside_prod_db.solana.fact_nft_sales, price
where block_timestamp::date >= '2022-05-09' and marketplace in ('magic eden v1', 'magic eden v2') and succeeded = true and date = date1
group by 1
union all
select date_trunc('day', block_timestamp) as date, sum(price_usd) as sales_volume, 'OpenSea' as marketplace
from flipside_prod_db.ethereum_core.ez_nft_sales
where block_timestamp::date >= '2022-05-09' and platform_name = 'opensea'
group by 1
Run a query to Download Data