mlhUntitled Query
    Updated 2022-11-17
    (with table_1 as (select min(block_timestamp) as first_tx,
    origin_from_address
    from polygon.core.fact_event_logs --GNS
    where tx_status= 'SUCCESS'
    and contract_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
    and origin_to_address in ('0xd8d177efc926a18ee455da6f5f6a6cfcee5f8f58','0x65187fec6ecc4774c1f632c7503466d5b4353db1','0xf8a140db8b05bec52c7e86d0d40d72f8e54fe559')
    and origin_from_address = event_inputs:from
    group by 2
    having first_tx >= current_date - 30)

    select date_trunc('day', first_tx) as date,
    count(distinct(origin_from_address)) as new_wallets,
    sum(new_wallets) over (order by date) as cumu_new_wallets,
    'GNS' as type
    from table_1
    group by 1
    order by 1 desc)

    UNION ALL

    (with table_1 as (select block_timestamp::date as day,
    case
    when contract_address = '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' then 'DAI'
    when contract_address = '0x17fc002b466eec40dae837fc4be5c67993ddbd6f' then 'FRAX'
    when contract_address = '0xf97f4df75117a78c1a5a0dbb814af92458539fb4' then 'LINK'
    when contract_address = '0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0' then 'UNI'
    when contract_address = '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8' then 'USDC'
    when contract_address = '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9' then 'USDT'
    when contract_address = '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f' then 'WBTC'
    when contract_address = '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' then 'WETH'
    end as asset_name,
    *
    from arbitrum.core.fact_event_logs --GMX
    where tx_status = 'SUCCESS'
    and event_name = 'Transfer'
    and event_inputs:value is not null
    Run a query to Download Data