NavidUntitled Query
Updated 2022-12-07Copy 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
›
⌄
select
date_trunc('week', block_timestamp) as day,
'Swap Out' as type,
count(distinct tx_hash) as swap_cnt,
count(distinct ORIGIN_FROM_ADDRESS) as swapper_cnt,
sum(AMOUNT_OUT_USD) as volume_usd
from
ethereum.core.ez_dex_swaps
where
TOKEN_IN ilike '0x4d224452801ACEd8B2F0aebE155379bb5D594381' and AMOUNT_OUT_USD is not null
group by 1
union all
select
date_trunc('week', block_timestamp) as day,
'Swap In' as type,
count(distinct tx_hash) as swap_cnt,
count(distinct ORIGIN_to_ADDRESS) as swapper_cnt,
sum(AMOUNT_IN_USD) as volume_usd
from
ethereum.core.ez_dex_swaps
where
TOKEN_out ilike '0x4d224452801ACEd8B2F0aebE155379bb5D594381' and AMOUNT_IN_USD is not null
group by 1
Run a query to Download Data