par_rndaily average swap size over last 6 months
Updated 2022-12-24
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
select
date_trunc('day',BLOCK_TIMESTAMP) AS day,
'PAXG' AS symbol,
avg(case when TOKEN_IN='0x45804880de22913dafe09f4980848ece6ecbaf78' then AMOUNT_IN_USD else AMOUNT_OUT_USD end) AS "Average Swap size",
avg("Average Swap size") over (order by Day, Day rows between 6 preceding and current row) as "swap size 7 MA"
from ethereum.core.ez_dex_swaps
where (TOKEN_IN='0x45804880de22913dafe09f4980848ece6ecbaf78' or TOKEN_OUT='0x45804880de22913dafe09f4980848ece6ecbaf78' )
and BLOCK_TIMESTAMP::date >= dateadd('month',-6,CURRENT_DATE)
group by 1
union ALL
select
date_trunc('day',BLOCK_TIMESTAMP) AS day,
'XAUT' AS symbol,
avg(case when TOKEN_IN='0x68749665ff8d2d112fa859aa293f07a622782f38' then AMOUNT_IN_USD else AMOUNT_OUT_USD end) AS "Average Swap size",
avg("Average Swap size") over (order by Day, Day rows between 6 preceding and current row) as "swap size 7 MA"
from ethereum.core.ez_dex_swaps
where (TOKEN_IN='0x68749665ff8d2d112fa859aa293f07a622782f38' or TOKEN_OUT='0x68749665ff8d2d112fa859aa293f07a622782f38' )
and BLOCK_TIMESTAMP::date >= dateadd('month',-6,CURRENT_DATE)
group by 1
Run a query to Download Data