Sbhn_NPStats comparison flow collections
Updated 2022-10-20Copy 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
27
28
29
30
31
32
33
34
35
36
›
⌄
with flowpricee as (
select TIMESTAMP::date as date, avg(price_usd) as flowprice
from flow.core.fact_prices
where symbol ='FLOW' and source ='coinmarketcap'
group by 1)
select 'TopShot' as collection,
count (distinct tx_id) as Sales_Count,
count (distinct nft_id) as Tokens_Count,
count (distinct buyer) as Buyers_Count,
count (distinct seller) as Sellers_Count,
count (distinct marketplace) as Markets_Count,
sum (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Total_Sale_Volume,
avg (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Average_Sale_Volume,
median (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Median_Sale_Volume,
min (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Min_Sale_Volume,
max (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Maximum_Sale_Volume
from flow.core.ez_nft_sales t1 join flowpricee t2 on t1.block_timestamp::date = t2.date
where nft_collection = 'A.0b2a3299cc857e29.TopShot'
and tx_succeeded = 'TRUE'
group by 1
UNION
select 'AllDay' as collection,
count (distinct tx_id) as Sales_Count,
count (distinct nft_id) as Tokens_Count,
count (distinct buyer) as Buyers_Count,
count (distinct seller) as Sellers_Count,
count (distinct marketplace) as Markets_Count,
sum (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Total_Sale_Volume,
avg (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Average_Sale_Volume,
median (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Median_Sale_Volume,
min (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Min_Sale_Volume,
max (case when currency ='A.ead892083b3e2c6c.FlowUtilityToken' then price*flowprice else price end) as Maximum_Sale_Volume
from flow.core.ez_nft_sales t1 join flowpricee t2 on t1.block_timestamp::date = t2.date
where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
Run a query to Download Data