SalehMetamask vs. Other Platforms-weekly
    Updated 2022-06-25
    with metamask as (
    select
    'MetaMask' as type
    ,date_trunc(week,block_timestamp::date) as date
    ,count(DISTINCT origin_from_address) as users
    ,count (distinct TX_HASH) as tx_count
    ,sum(users) over (partition by type order by date) as growth_user
    from ethereum.core.fact_event_logs
    where contract_address = '0x881d40237659c251811cec9c364ef91dc08d300c'
    and TX_STATUS='SUCCESS'
    and block_timestamp >='2021-04-01'
    group by 1,2
    )

    ,thorchain as (
    select 'thorchain' as type
    ,date_trunc(week,block_timestamp::date) as date
    ,count(distinct from_address) as users
    ,count (distinct tx_id) as tx_count
    ,sum(users) over (partition by type order by date) as growth_user
    from flipside_prod_db.thorchain.swaps
    where block_timestamp >='2021-04-01'
    group by 1,2
    )

    ,platforms as (
    select
    platform as type
    ,date_trunc(week,block_timestamp::date) as date
    ,count(distinct origin_from_address) as users
    ,count (distinct tx_hash) as tx_count
    ,sum(users) over (partition by type order by date) as growth_user
    from ethereum.core.ez_dex_swaps
    where block_timestamp >='2021-04-01'
    group by 1,2
    )
    Run a query to Download Data