SocioAnalyticatransfer
Updated 2024-03-21
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 sei_network as (
with transfers as (
select
tx_id,
block_timestamp
from sei.core.fact_msg_attributes
where block_timestamp::date >= dateadd('day', -{{past_days}}, current_date)
and msg_type = 'message'
and ATTRIBUTE_KEY = 'module'
and ATTRIBUTE_VALUE = 'bank'
and TX_SUCCEEDED
intersect
SELECT
tx_id,
block_timestamp
from sei.core.fact_transfers
where block_timestamp::date >= dateadd('day', -{{past_days}}, current_date)
and transfer_type = 'SEI'
and sender != receiver
and amount != 1 -- filter mint inscription
)
-- ,
-- sei_price as (
-- SELECT 'SEI' as network,
-- TO_TIMESTAMP(value[0]::string) as date,
-- value[1] as last_price
-- FROM (
-- SELECT livequery.live.udf_api(
-- 'https://api.coingecko.com/api/v3/coins/sei-network/market_chart?vs_currency=usd&days=30') as response
-- ),LATERAL FLATTEN (input => response:data:prices)
-- qualify row_number () over (order by date DESC) = 1
-- )
,
sei_price as (
QueryRunArchived: QueryRun has been archived