RamaharMetamask vs. Other Platforms
    Updated 2022-06-25
    with metamask as (
    select tx_hash
    from ethereum.core.fact_transactions
    where to_address = lower('0x881D40237659C251811CEC9c364ef91dC08D300C')
    ),

    generic as (select
    s.block_timestamp,
    s.origin_from_address,
    'metamask' as platform,
    s.amount_in_usd
    from metamask m
    inner join ethereum.core.ez_dex_swaps s on m.tx_hash = s.tx_hash

    UNION ALL

    select
    s.block_timestamp,
    s.origin_from_address,
    s.platform,
    s.amount_in_usd
    from ethereum.core.ez_dex_swaps s
    where tx_hash not in (select * from metamask) and platform = 'sushiswap'

    UNION ALL

    select
    s.block_timestamp,
    s.origin_from_address,
    s.platform,
    s.amount_in_usd
    from ethereum.core.ez_dex_swaps s
    where tx_hash not in (select * from metamask) and platform = 'uniswap-v2')

    select
    Run a query to Download Data