Sandeshmetrics dao 1.1
    Updated 2022-12-09
    with sushi as
    (
    select
    block_timestamp::date as "date" ,
    sum(amount_in_usd) as sushi_volume,
    count(distinct ORIGIN_FROM_ADDRESS) as sushi_users,
    count(distinct tx_hash) as sushi_swaps
    from ethereum.core.ez_dex_swaps
    where platform = 'sushiswap'
    group by "date"
    ),

    uniswap as (
    select
    block_timestamp::date as "date" ,
    sum(amount_in_usd) as uni_volume,
    count(distinct ORIGIN_FROM_ADDRESS) as uni_users,
    count(distinct tx_hash) as uni_swaps
    from ethereum.core.ez_dex_swaps
    where platform ilike '%uniswap%'
    group by "date"
    )

    select sushi.*,uni.*
    from sushi inner join uniswap uni
    on sushi."date"=uni."date"
    where sushi."date" > current_date -interval '3 months'
    Run a query to Download Data