freemartianDaily Top 3 Entrance Paths
Updated 2022-11-18
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
31
32
33
34
35
36
›
⌄
with prices as (
select
recorded_at::date as day,
lower(symbol) as asset,
avg(price) as usd_average_price
from osmosis.core.dim_prices
group by 1, 2
),
source as (
select
block_timestamp::date as day,
tx_id,
sender,
receiver,
regexp_substr (sender,'[a-zA-Z]+|\d+') as origin_chain,
regexp_substr (receiver,'[a-zA-Z]+|\d+') as destination,
origin_chain|| ' To ' || destination as path,
lower(split(currency,'-')[0]) as symbol,
iff(symbol ilike 'u%', substring(symbol, 2, LEN(symbol)), symbol) as token,
transfer_type,
amount,
decimal
from axelar.core.fact_transfers
where block_timestamp::date > CURRENT_DATE - 30
and transfer_type in ('IBC_TRANSFER_IN'
)
and TX_SUCCEEDED = 'TRUE'),
table1 as (
select
s.*,
((amount * usd_average_price)/pow(10,decimal)) as usd_amount
from source s left join prices p on (s.day = p.day and p.asset = s.token)
union all
Run a query to Download Data