Eman-RazTotal
Updated 2023-08-10
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 tab1 as (select date_trunc('month',block_timestamp) as month, sum(amount_in) as sell_volume, sum(amount_in_usd) as sell_volume_usd,
count(distinct tx_hash) as sell_count, count(distinct origin_from_address) as seller_count
from ethereum.core.ez_dex_swaps
where symbol_in='{{DEX_Token}}' and
(token_in='0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' --uni
or token_in='0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f' --snx
or token_in='0xd533a949740bb3306d119cc777fa900ba034cd52' --crv
or token_in='0x111111111117dc0aa78b770fa6a738034120c302' --1inch
or token_in='0xbbbbca6a901c926f240b89eacb641d8aec7aeafd' --lrc
or token_in='0xba100000625a3754423978a60c9317c58a424e3d' --bal
or token_in='0x6b3595068778dd592e39a122f4f5a5cf09c90fe2' --sushi
or token_in='0x92d6c1e31e14520e676a687f0a93788b716beff5' --dydx
or token_in='0xe41d2489571d322189246dafa5ebde1f4699f498' --zrx
or token_in='0x43dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd' --dodo
or token_in='0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c') --bnt
group by 1
order by 1),
tab2 as (select date_trunc('month',block_timestamp) as month, sum(amount_out) as buy_volume, sum(amount_in_usd) as buy_volume_usd,
count(distinct tx_hash) as buy_count, count(distinct origin_from_address) as buyer_count
from ethereum.core.ez_dex_swaps
where symbol_out='{{DEX_Token}}' and
(token_out='0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' --uni
or token_out='0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f' --snx
or token_out='0xd533a949740bb3306d119cc777fa900ba034cd52' --crv
or token_out='0x111111111117dc0aa78b770fa6a738034120c302' --1inch
or token_out='0xbbbbca6a901c926f240b89eacb641d8aec7aeafd' --lrc
or token_out='0xba100000625a3754423978a60c9317c58a424e3d' --bal
or token_out='0x6b3595068778dd592e39a122f4f5a5cf09c90fe2' --sushi
or token_out='0x92d6c1e31e14520e676a687f0a93788b716beff5' --dydx
or token_out='0xe41d2489571d322189246dafa5ebde1f4699f498' --zrx
or token_out='0x43dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd' --dodo
or token_out='0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c') --bnt
group by 1
order by 1)
select sum(buy_volume) as "Buy Volume", sum(sell_volume) as "Sell Volume", sum(buy_volume_usd) as "Buy Vol USD",
Run a query to Download Data