ValiMohammadiall sale information(weekly)
Updated 2023-01-30
99
1
2
3
4
5
6
7
8
9
10
›
⌄
with t1 AS ( select RECORDED_HOUR::date as day, avg(close) as price_token
from solana.core.fact_token_prices_hourly where SYMBOL='SOL' group by 1)
select date_trunc('week',BLOCK_TIMESTAMP) as date, count(distinct tx_id) as number_of_sale, count(distinct PURCHASER) as number_of_buyer,
sum(SALES_AMOUNT) as volume, sum(SALES_AMOUNT*price_token) as volume_usd, avg(SALES_AMOUNT*price_token)as average_volume,
Median(SALES_AMOUNT*price_token) as median_volume, avg(average_volume) OVER (ORDER BY date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) as MA_7_Days,
avg(average_volume) OVER (ORDER BY date ROWS BETWEEN 19 PRECEDING AND CURRENT ROW) as MA_20_Days, min(SALES_AMOUNT*price_token) as floor_price,
max(SALES_AMOUNT*price_token) as highest_price, sum(number_of_buyer) over (order by date) as cum_buyers, sum(number_of_sale) over (order by date) as cum_sale,
sum(volume_usd) over (order by date) as cum_volume
from solana.core.fact_nft_sales x join t1 y on x.BLOCK_TIMESTAMP::date=y.day left join solana.core.dim_nft_metadata z on x.mint=z.mint
where SUCCEEDED='TRUE' and MARKETPLACE ='exchange art' and SALES_AMOUNT > 0 group by 1
Run a query to Download Data