Salehsei_nft_main_top_nft_volume_Sei Portals
Updated 2024-03-06Copy Reference Fork
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
›
⌄
-- forked from sei_nft_main_top_nft_volume_dob @ https://flipsidecrypto.xyz/edit/queries/3688fc7f-da44-4be9-b995-a0df417ab9ff
with lst_buyer as (
select
tx_id
,ATTRIBUTE_VALUE as buyer
,msg_index
from sei.core.fact_msg_attributes
where MSG_TYPE = 'wasm'
and block_timestamp::date>='2023-12-27'
and ATTRIBUTE_KEY = 'recipient'
and tx_succeeded = true
)
,lst_amount_seller as (
select
tx_id
,split(ATTRIBUTE_VALUE,'usei')[0]/1e6 as amount_sell
,msg_index
from sei.core.fact_msg_attributes
where block_timestamp::date>='2023-12-27'
and MSG_TYPE = 'wasm-buy_now'
and ATTRIBUTE_KEY = 'sale_price'
and tx_succeeded = true
)
,lst_contract_address as (
select
tx_id
,ATTRIBUTE_VALUE as contract_address
,msg_index
from sei.core.fact_msg_attributes
where block_timestamp::date>='2023-12-27'
and MSG_TYPE = 'wasm-buy_now'
and ATTRIBUTE_KEY = '_contract_address'
and tx_succeeded = true
QueryRunArchived: QueryRun has been archived