0xHaM-dchains1
Updated 2022-10-28Copy 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
›
⌄
SELECT
date_trunc('{{Interval}}', BLOCK_TIMESTAMP)::date as date,
CASE
WHEN sender Ilike 'terra%' then 'terra'
WHEN sender Ilike 'kujira%' THEN 'kujira'
WHEN sender Ilike 'osmo%' then 'osmo'
WHEN sender Ilike 'juno%' then 'juno'
WHEN sender Ilike 'secret%' then 'secret'
WHEN sender Ilike 'cosmos%' then 'cosmos'
WHEN sender Ilike 'stars%' then 'stargaze'
WHEN sender Ilike 'i%' then 'ki'
WHEN sender Ilike 'cre%' then 'Crescent'
WHEN sender Ilike 'emoney%' then 'e-money'
END as chain,
CURRENCY as asset,
COUNT(DISTINCT tx_id) as chain_tx_cnt,
COUNT(DISTINCT tx_id) as asset_tx_cnt,
sum(AMOUNT/pow(10,decimal)) 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_transfers
WHERE TRANSFER_TYPE = 'IBC_TRANSFER_IN'
and (amount/pow(10,decimal)) is not null
and chain is not null
and TX_SUCCEEDED = 'TRUE'
group by 1,2,3
Run a query to Download Data