MoeYEL Distribution of Interchain Transfers Based on Volume Over Time
Updated 2024-09-24
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
pc as (select hour::date as Date, avg(price) as avg_price
from crosschain.price.ez_prices_hourly
where token_address=lower('0x949185d3be66775ea648f4a306740ea9eff9c567')
group by 1
order by 1)
,
base as (
select
id,
CREATED_AT,
amount * avg_price as vol_usd
from axelar.axelscan.fact_gmp join pc
on
date_trunc('day',created_at) = Date
where call ilike '%0xb5fb4be02232b1bba4dc8f81dc24c26980de9e3c%'
and (data:executed:receipt:logs[1]:address=lower('0x949185d3be66775ea648f4a306740ea9eff9c567')
) )
,
tab1 as (select id, case
when (vol_usd)<=10 then 'V<=10 $'
when (vol_usd)>10 and (vol_usd)<=100 then '10 - 100 $'
when (vol_usd)>100 and (vol_usd)<=1000 then '100 - 1000 $'
when (vol_usd)>1000 and (vol_usd)<=2000 then '1k - 2k $'
when (vol_usd)>2000 and (vol_usd)<=5000 then '2k - 5k $'
when (vol_usd)>5000 and (vol_usd)<=10000 then '5k - 10k'
when (vol_usd)>10000 then 'V>10k $'
end as "Class",CREATED_AT as date
from base
)
select
date_trunc('{{Time_Frame}}',date) as "Date",
QueryRunArchived: QueryRun has been archived