afonsoWeekly number of outflow transactions to each chain
Updated 2023-04-13Copy 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
›
⌄
select
date_trunc('week', block_timestamp)::date as week,
case
when message_value:receiver ilike '%kujira%' then 'Kujira'
when message_value:receiver ilike '%osmo%' then 'Osmosis'
when message_value:receiver ilike '%axelar%' then 'Axelar'
when message_value:receiver ilike '%evmos%' then 'Evmos'
when message_value:receiver ilike '%secret%' then 'Secret'
when message_value:receiver ilike '%juno%' then 'Juno'
when message_value:receiver ilike '%cre%' then 'Cre'
when message_value:receiver ilike '%gravity%' then 'Gravity'
when message_value:receiver ilike '%sif%' then 'Sif'
when message_value:receiver ilike '%stride%' then 'Stride'
else message_value:receiver
end as destination_chain,
count(distinct tx_id) as txn_count,
count(distinct sender) as wallets_count,
sum(amount::number / pow(10, 6)) as total_volume,
avg(amount::number / pow(10, 6)) as avg_volume,
sum(txn_count) over(partition by destination_chain order by week asc) as cumulative_txn_count,
sum(wallets_count) over(partition by destination_chain order by week asc) as cumulative_wallets_count
from terra.core.ez_transfers
where tx_succeeded = 1
and message_value:receiver not ilike '%terra%'
and currency = 'uluna'
and message_value:receiver is not null
group by week, destination_chain
order by week, destination_chain asc
Run a query to Download Data