Eman-RazSwap Count
Updated 2023-04-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
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 token_in='0x0f5d2fb29fb7d3cfee444a200298f468908cc942' and block_timestamp::date>='2021-01-01'
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 token_out='0x0f5d2fb29fb7d3cfee444a200298f468908cc942' and block_timestamp::date>='2021-01-01'
group by 1
order by 1)
select tab1.month as month, buy_volume as "Buy Volume", -sell_volume as "Sell Volume", buy_volume_usd as "Buy Vol USD",
-sell_volume_usd "Sell Vol USD", buy_count as "Buy Count", -sell_count as "Sell Count",
buyer_count as "Buyer Count", -seller_count as "Seller Count"
from tab1 full outer join tab2 on tab1.month=tab2.MONTH
order by 1
Run a query to Download Data