hessTotal
Updated 2024-04-17
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 mrkt as ( select DISTINCT tx_id
from sei.core.fact_msg_attributes
where attribute_value = 'sei1dkp90y3jpp2dres2ssp5rak2k6mc7l4nsxz58nktxjsxqp88fcasmrr672'
and tx_succeeded = 'true'
and attribute_key = '_contract_address'
and msg_type = 'wasm'
and block_timestamp::date >= '2024-02-22')
,
mrkt_collection as ( select date(block_timestamp) as date, tx_id, MSG_GROUP, attribute_value as collection_address
from sei.core.fact_msg_attributes
where ATTRIBUTE_KEY = 'cw721_address'
and msg_type = 'wasm'
and block_timestamp::Date >= '2024-02-22'
and tx_id in (select tx_id from mrkt)
and attribute_value = 'sei1g2a0q3tddzs7vf7lk45c2tgufsaqerxmsdr2cprth3mjtuqxm60qdmravc')
,
mrkt_nft as ( select date,a.tx_id, a.msg_group , attribute_value as token_id, collection_address
from sei.core.fact_msg_attributes a join mrkt_collection b on a.tx_id = b.tx_id and a.msg_group = b.msg_group
where attribute_key = 'token_id'
and msg_type = 'wasm'
and block_timestamp::date >= '2024-02-22')
,
mrkt_seller as ( select date,a.tx_id, a.msg_group , token_id, collection_address,ATTRIBUTE_VALUE as seller
from sei.core.fact_msg_attributes a join mrkt_nft b on a.tx_id = b.tx_id and a.msg_group = b.msg_group
where attribute_key = 'seller'
and msg_type = 'wasm'
and block_timestamp::date >= '2024-02-22')
,
mrkt_buyer as ( select date,a.tx_id, b.msg_group , token_id, collection_address,seller , ATTRIBUTE_VALUE as buyer
from sei.core.fact_msg_attributes a join mrkt_seller b on a.tx_id = b.tx_id
where attribute_key = 'buyer'
and msg_type = 'wasm'
and block_timestamp::date >= '2024-02-22')
,
mrkt_volume as ( select date, a.tx_id ,token_id, buyer,(ATTRIBUTE_VALUE)/pow(10,6) as price, seller
from sei.core.fact_msg_attributes a join mrkt_buyer b on a.tx_id = b.tx_id and a.msg_group = b.msg_group
QueryRunArchived: QueryRun has been archived