omer93dot on sei v2 2nd sales
Updated 2025-01-16
999
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-02-01'
and collection = 'sei16gu84gxlwvw0myjfzmhpws077v0584r23rgsp8yeetpyyrauveds2gppt2'
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 * 1.5) AS sei_volume
FROM
info
)
select
count(distinct tx_id) as sales,
sum(nft_id) as distinct_nft_sold,
count(distinct buyer) as buyers,
count(distinct seller) as sellers,
sum(sei_volume) as sei_volume,
avg(sei_price) as avg_nft_price,
max(sei_price) as max_nft_price
from info2
QueryRunArchived: QueryRun has been archived