MahrooUntitled Query
Updated 2022-11-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
select block_timestamp::date as date,
case when nft_address = '0x60bb1e2aa1c9acafb4d34f71585d7e959f387769' then 'Art Gobblers' else project_name end as Project_name1,
count (distinct tx_hash) as Sales_Count,
count (distinct buyer_address) as Buyers_Count,
count (distinct seller_address) as Sellers_Count,
count (distinct nft_address) as Collections_Count,
count (distinct tokenid) as Tokens_Count,
sum (price_usd) as Total_USD_Volume,
avg (price_usd) as Average_USD_Volume,
median (price_usd) as Median_USD_Volume,
min (price_usd) as Floor_Price,
max (price_usd) as Price_Ceiling,
avg (Average_USD_Volume) over (partition by Project_name1 order by date rows between 7 PRECEDING and current row) as Moving_Average_7,
avg (Average_USD_Volume) over (partition by Project_name1 order by date rows between 30 PRECEDING and current row) as Moving_Average_30,
sum (total_usd_volume) over (partition by Project_name1 order by date) as Cumulative_Volume,
sum (sales_count) over (partition by Project_name1 order by date) as Cumulative_Sales_Count
from ethereum.core.ez_nft_sales
where nft_address in ('0x60bb1e2aa1c9acafb4d34f71585d7e959f387769','0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb','0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d','0x34d85c9cdeb23fa97cb08333b511ac86e1c4e258','0x49cf6f5d44e70224e2e23fdcdd2c053f30ada28b')
and price_usd > 0
and block_timestamp >= '2022-10-31'
group by 1,2
order by 1
Run a query to Download Data