Afonso_Diaz2023-10-25 06:39 PM
Updated 2023-10-25
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
pal1 as
(SELECT tx_id as tx, BLOCK_TIMESTAMP::date as date, ATTRIBUTE_VALUE as token_id
FROM
sei.core.fact_msg_attributes
where
ATTRIBUTE_KEY = 'nft_token_id'
and MSG_TYPE = 'wasm-buy_now'),
pal2 as (SELECT
DISTINCT token_id, ATTRIBUTE_VALUE as nft, tx, date
FROM
sei.core.fact_msg_attributes
join pal1 on tx_id=tx
where
ATTRIBUTE_KEY = 'nft_address'
and MSG_TYPE = 'wasm-buy_now'),
pal3 as (SELECT DISTINCT token_id, nft, ATTRIBUTE_VALUE as seller, tx, date
FROM
sei.core.fact_msg_attributes
join pal2 on tx_id=tx
where
ATTRIBUTE_KEY = 'nft_seller'
and MSG_TYPE = 'wasm-buy_now'),
pal4 as (SELECT
split_part(attribute_value, ', ', 2) as x, substring(x,1,len(x)-4) as x2,
substring(x2,17,len(x2))/1e6 as price, tx_id as tx4
FROM
Run a query to Download Data