Abolfazl_771025Satellite overview
Updated 2023-03-03Copy Reference Fork
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
›
⌄
with table1 as (select
tx_id,
attribute_value as to_chain
from axelar.core.fact_msg_attributes
where attribute_key = 'destinationChain'
),volume as(select
date_trunc('week',block_timestamp) as date,
to_chain,
count(DISTINCT a.tx_id) as tx_count,
sum(cast(REPLACE(attribute_value,'uaxl','') as INT) / power(10, 6)) as volume
from axelar.core.fact_msg_attributes a left outer join table1 b on a.tx_id=b.tx_id
where msg_type like 'coin_spent'
and attribute_value like '%uaxl%'
and attribute_index = 1
and not to_chain is null
group by 1,2
),users as (select
date_trunc('week',block_timestamp) as date,
count(DISTINCT attribute_value) as users_count
from axelar.core.fact_msg_attributes a left outer join table1 b on a.tx_id=b.tx_id
where ATTRIBUTE_KEY in ('sender')
and not a.tx_id is null
group by 1)
select
a.date,
to_chain,
tx_count,
users_count,
volume
from volume a join users b on a.date=b.date
Run a query to Download Data