Updated 2022-10-13
    select
    BLOCK_TIMESTAMP::date as day,
    'Optimism' as network,
    count(distinct ORIGIN_FROM_ADDRESS) as distinct_users,
    count(distinct TX_HASH) as count_open,
    sum(count_open) over (order by day) as cum_open,
    sum(distinct_users) over (order by day) as cum_users
    from optimism.core.fact_token_transfers
    where ORIGIN_TO_ADDRESS='0x059d306a25c4ce8d7437d25743a8b94520536bd5' and ORIGIN_FUNCTION_SIGNATURE='0xded700a6'
    group by 1
    union all
    select
    BLOCK_TIMESTAMP::date as day,
    'Polygon' as network,
    count(distinct ORIGIN_FROM_ADDRESS) as distinct_users,
    count(distinct TX_HASH) as count_open,
    sum(count_open) over (order by day) as cum_open,
    sum(distinct_users) over (order by day) as cum_users
    from polygon.core.fact_token_transfers
    --join flipside_prod_db.polygon.labels y on x.CONTRACT_ADDRESS=y.ADDRESS
    where ORIGIN_TO_ADDRESS='0x059d306a25c4ce8d7437d25743a8b94520536bd5' and ORIGIN_FUNCTION_SIGNATURE='0xded700a6'
    group by 1
    Run a query to Download Data