messariSolana NFT Volume copy
Updated 2023-08-19
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
›
⌄
-- forked from siavashj / Solana NFT Volume @ https://flipsidecrypto.xyz/siavashj/q/zyGFmec2dBzM/solana-nft-volume
with prices as (
select
recorded_hour::date as day,
avg(close) as price
from solana.core.ez_token_prices_hourly
where symbol ilike 'sol'
group by 1
),
base as (
select
block_timestamp,
tx_id,
seller,
purchaser,
sales_amount,
marketplace,
case when marketplace in ('magic eden v2','Magic Ededn') then 'Magic Eden'
else marketplace end as markets
from solana.core.fact_nft_sales
where block_timestamp >= '2023-01-01'
and succeeded = TRUE
)
select
block_timestamp::date as date,
count(distinct tx_id) as "Number Sold",
count(distinct seller) as "Number Seller",
count(distinct purchaser) as "Number Buyer",
sum(sales_amount) * price as "Amount USD",
markets
from base join prices
on block_timestamp::date = day
group by 1,6,price
Run a query to Download Data