omer93crossover 2nd sales 2
Updated 2024-11-28
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 info AS (
SELECT
tx_id,
block_timestamp,
COUNT(token_id) AS nft_id,
buyer_address AS buyer,
seller_address AS seller,
nft_address AS collection,
amount AS attribute_value
FROM
sei.nft.ez_nft_sales
WHERE
--block_timestamp > '2024-08-01'
collection = 'sei19way3nltzhmytwfc8gsc94f0vwpfuy7gzt969qyndnwgtyntu89skfujq4'
GROUP BY
tx_id, block_timestamp, buyer, seller, collection, attribute_value
),
info2 AS (
SELECT
*,
attribute_value as prices,
prices AS sei_price,
(prices * nft_id) AS sei_volume
FROM
info
)
SELECT
TRUNC(block_timestamp, 'week') AS time,
SUM(nft_id) AS sales,
COUNT(DISTINCT buyer) AS buyers,
COUNT(DISTINCT seller) AS sellers,
SUM(sei_price) AS sei_volume,
AVG(sei_price) AS avg_nft_price,
MAX(sei_price) AS max_nft_price,
COUNT(DISTINCT collection) AS total_collections
QueryRunArchived: QueryRun has been archived