tongzzezNFT weekly
Updated 2023-04-13
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
›
⌄
SELECT
date_trunc(week, block_timestamp) as date,
count(tx_hash) as sale_count,
count(distinct buyer_address) as unique_buyer,
count(distinct seller_address) as unique_seller,
sum(case when currency_symbol = 'ETH' then price End) as volume,
avg(case when currency_symbol = 'ETH' then price End) as avg_price,
sum(price_usd) as volume_usd,
avg(price_usd) as avg_price_usd,
sum(sale_count) over (order by date) as cumu_count,
sum(unique_buyer) over (order by date) as cumu_buyer,
sum(volume) over (order by date) as cumu_volume,
avg(avg_price) OVER (ORDER BY date ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as MA_7_Days,
sum(volume_usd) over (order by date) as cumu_volume_usd,
avg(avg_price_usd) OVER (ORDER BY date ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as MA_7_Days_usd
FROM
optimism.core.ez_nft_sales
where
block_timestamp::date < CURRENT_DATE
group by date order by date
Run a query to Download Data