Sbhn_NPEthereum - Swap From Volume of Stablecoins (in USD)
Updated 2022-11-25
999
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 mim_base1 as (select date_trunc('month', block_timestamp) as month,
sum(amount_in_usd) as mim_vol_from
from ethereum.core.ez_dex_swaps
where token_in = '0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3'
and date_trunc('month', block_timestamp) >= '2022-01-01'
group by 1),
mim_base2 as (select date_trunc('month', block_timestamp) as month,
sum(amount_out_usd) as mim_vol_to
from ethereum.core.ez_dex_swaps
where token_out = '0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3'
and date_trunc('month', block_timestamp) >= '2022-01-01'
group by 1),
mim_base3 as (select a.month,
mim_vol_from,
mim_vol_to,
mim_vol_from + mim_vol_to as mim_total_vol
from mim_base1 a
join mim_base2 b
on a.month = b.month),
frax_base1 as (select date_trunc('month', block_timestamp) as month,
sum(amount_in_usd) as frax_vol_from
from ethereum.core.ez_dex_swaps
where token_in = '0x853d955acef822db058eb8505911ed77f175b99e'
and date_trunc('month', block_timestamp) >= '2022-01-01'
group by 1),
frax_base2 as (select date_trunc('month', block_timestamp) as month,
sum(amount_out_usd) as frax_vol_to
from ethereum.core.ez_dex_swaps
where token_out = '0x853d955acef822db058eb8505911ed77f175b99e'
and date_trunc('month', block_timestamp) >= '2022-01-01'
group by 1),
Run a query to Download Data