hbd1994EVM Chains
Updated 2022-10-29
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
›
⌄
-- SELECT *
-- from axelar.core.fact_transactions
-- where tx_id = 'A00343053CC92C31E4E00315F64BE3BD83982857F2DB610B559F8E6CF64CD594'
with chains as (
SELECT
BLOCK_TIMESTAMP,
ATTRIBUTE_VALUE as chain,
tx_id
from axelar.core.fact_msg_attributes
where MSG_TYPE = 'axelar.evm.v1beta1.ConfirmDepositStarted'
AND TX_ID IN (SELECT tx_id FROM axelar.core.fact_msgs WHERE MSG_TYPE in ('message', 'transfer', 'tx'))
and ATTRIBUTE_KEY in ('chain')
)
SELECT
date_trunc('day', BLOCK_TIMESTAMP)::date as date,
chain,
ATTRIBUTE_VALUE as asset,
COUNT(DISTINCT a.tx_id) as chain_tx_cnt,
COUNT(DISTINCT b.tx_id) as asset_tx_cnt,
sum(0) as amount,
sum(chain_tx_cnt) over (partition by chain order by date) as cum_chain_tx_cnt,
sum(asset_tx_cnt) over (partition by asset order by date) as cum_asset_tx_cnt
from axelar.core.fact_msg_attributes a join chains b USING(tx_id)
where MSG_TYPE = 'axelar.evm.v1beta1.ConfirmDepositStarted'
AND TX_ID IN (SELECT tx_id FROM axelar.core.fact_msgs WHERE MSG_TYPE in ('message', 'transfer', 'tx'))
and ATTRIBUTE_KEY in ('asset')
group by 1,2,3
Run a query to Download Data