PapasotAlgorand NFTs by marketplace last 30 days + USD volume
Updated 2023-01-03
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 algo_price as (select
avg(price_usd) as price ,
BLOCK_HOUR::date as day
from algorand.prices_swap
where asset_id= 0
GROUP by day
order by day
),
NFTS as (
SELECT
date_trunc('day',block_timestamp) as day,
nft_marketplace,
case
when nft_marketplace = 'rand gallery' then 'Rand Gallery'
when nft_marketplace = 'algoxnft' then 'Algoxnft'
else 'Others' end as marketplace,
count(distinct(purchaser)),
count(distinct(nft_asset_id)),
sum(total_sales_amount) as total_Algo,
--total_Algo * b.price as total_USD,
sum(number_of_nfts)
from
algorand.nft_sales
where
day >= CURRENT_DATE - 30
group by day,nft_marketplace
order by day)
select
a.* ,
a.total_Algo * b.price as total_USD,
sum(total_USD) over(ORDER by day ) as cum_total_USD
from NFTS a LEFT JOIN algo_price b USING(day)
Run a query to Download Data