Sbhn_NPEthereum - Swap From Volume of Stablecoins (in USD)
    Updated 2022-11-25
    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