Elprognerd1 daily sales copy
Updated 2023-03-18
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
price_t AS (
SELECT
recorded_hour::date as date1,
AVG(close) as price
FROM
solana.core.fact_token_prices_hourly
WHERE
SYMBOL = 'SOL'
GROUP BY
1
)
SELECT
BLOCK_TIMESTAMP::date as date,
'Tensor' as market1,
COUNT(distinct TX_ID) as "Number of Sales",
SUM("Number of Sales") OVER (
ORDER BY
date
) as "Cumulative Number of NFT sales",
SUM(SALES_AMOUNT * price) as "NFT Volume in USD",
AVG(SALES_AMOUNT * price) as "Average Daily Sold Volume",
SUM("NFT Volume in USD") OVER (
ORDER BY
date
) as "Cumulative Volume of NFT Sales",
COUNT(distinct PURCHASER) as "Number of Daily Buyers",
COUNT(distinct SELLER) as "Number of Daily Sellers"
FROM
solana.core.fact_nft_sales x
JOIN price_t y ON x.BLOCK_TIMESTAMP::date = y.date1
WHERE
SUCCEEDED = 'true' AND BLOCK_TIMESTAMP>= '2023-01-01'
AND MARKETPLACE = 'tensorswap'
GROUP BY
1,
Run a query to Download Data