mz0111bridges 7
Updated 2022-11-25Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with tab1 as
(select
RECEIVER,
Min(date_trunc('day', block_timestamp)) as min_date,
Max(date_trunc('day', block_timestamp)) as max_date,
count(tx_id) as bridges
from axelar.core.fact_transfers
where transfer_type in ('IBC_TRANSFER_IN','IBC_TRANSFER_OUT')
AND not CURRENCY ilike any ('factory%', 'gravity%')
AND amount is not NULL
AND currency is not NULL
group by 1
having Min(date_trunc('day', block_timestamp)) > current_date - 90
)
select
sum(datediff('day', min_date, max_date))/ sum(bridges) as Time_Between_bridges
from tab1
Run a query to Download Data