hessPrice Breakdown
Updated 2024-03-05
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 dim_collection as ( select * from
( values ('Yaka','sei1wzhrqprfpxagkrxz9fspmnrtc0fqusk5g6ynpezcl705sfqs55nqscej0k')
) as a (collection_name, collect))
,
pallet as ( select DISTINCT tx_id,
msg_type
from sei.core.fact_msg_attributes
where ATTRIBUTE_VALUE in ('sei152u2u0lqc27428cuf8dx48k8saua74m6nql5kgvsu4rfeqm547rsnhy4y9')
and ATTRIBUTE_KEY = '_contract_address'
and msg_type in ('wasm-buy_now','wasm-accept_bid')
and TX_SUCCEEDED = 'true'
and block_timestamp::date >= '2024-01-30')
,
seller as ( select block_timestamp, tx_id, msg_index, ATTRIBUTE_VALUE as seller
from sei.core.fact_msg_attributes
where tx_id in (select tx_id from pallet)
and ATTRIBUTE_KEY = 'nft_seller'
and block_timestamp::date >= '2024-01-30')
,
nft_id as ( select a.block_timestamp, a.tx_id, a.msg_index,seller, ATTRIBUTE_VALUE as token_id
from sei.core.fact_msg_attributes a join seller b on a.tx_id = b.tx_id and a.msg_index = b.msg_index
where ATTRIBUTE_KEY = 'nft_token_id'
and a.block_timestamp::date >= '2024-01-30')
,
collection as ( select a.block_timestamp, a.tx_id, a.msg_index,seller, token_id, ATTRIBUTE_VALUE as collection_address
from sei.core.fact_msg_attributes a join nft_id b on a.tx_id = b.tx_id and a.msg_index = b.msg_index
where ATTRIBUTE_KEY = 'nft_address'
and a.block_timestamp::date >= '2024-01-30')
,
price as ( select a.block_timestamp, a.tx_id, a.msg_index,seller, token_id, collection_address, case when attribute_value ilike 'native:%' then substr(attribute_value, 13,24)
else split(attribute_value, 'usei')[0] end as prices, prices/pow(10,6) as price
from sei.core.fact_msg_attributes a join collection b on a.tx_id = b.tx_id and a.msg_index = b.msg_index
where ATTRIBUTE_KEY = 'sale_price'
and a.block_timestamp::date >= '2024-01-30')
,
buyer as ( select a.block_timestamp, 'Pallet' as platform, a.tx_id, a.msg_index,seller, token_id, collection_address, price , ATTRIBUTE_VALUE as buyer
QueryRunArchived: QueryRun has been archived