Moe8 NFT opt
Updated 2022-10-20
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
›
⌄
⌄
/*
Sales volume (daily/weekly/monthly)
Total Sales Volume
Daily Average Sales Price and 7-day moving average
Total Unique Buyers
Average Buyers/Day
*/
select
count(distinct BUYER_ADDRESS) as buyer_count,
count(distinct SELLER_ADDRESS) as SELLER_count,
count(distinct tx_hash) as sale_count,
sum(PRICE_USD) as sale_volume,
sale_volume/buyer_count as usd_per_buyer,
sale_volume/sale_count as usd_per_sale,
sale_volume/ count(DISTINCT nft_address) as usd_per_collection,
buyer_count/ {{days_back}} as buyer_per_day,
avg (price_usd) as Avg_sale_Volume,
max (price_usd) as Max_sale_Volume,
median (price_usd) as Med_sale_Volume,
min (price_usd) as Min_sale_Volume
from optimism.core.ez_nft_sales
where tx_hash is not NULL
and origin_from_address != seller_address -- Secondary
and EVENT_TYPE = 'sale'
and price_usd > 0
and BLOCK_TIMESTAMP >= CURRENT_DATE - {{days_back}}
Run a query to Download Data